2022-08-15 10:01:39 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
version: '3.4'
|
|
|
|
|
|
|
|
services:
|
|
|
|
web:
|
2023-02-04 11:25:50 +00:00
|
|
|
build: .
|
|
|
|
image: glenux/service-forgejo
|
2022-08-15 10:01:39 +00:00
|
|
|
environment:
|
|
|
|
USER_UID: 1000
|
|
|
|
USER_GID: 1000
|
|
|
|
GITEA__database__DB_TYPE: mysql
|
|
|
|
GITEA__database__HOST: db:3306
|
2023-02-04 11:25:50 +00:00
|
|
|
GITEA__database__NAME: forgejo
|
|
|
|
GITEA__database__USER: forgejo
|
|
|
|
GITEA__database__PASSWD: forgejo
|
2022-08-15 10:01:39 +00:00
|
|
|
# GITEA__mailer__ENABLED: true
|
|
|
|
# GITEA__mailer__FROM: "${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}"
|
|
|
|
# GITEA__mailer__MAILER_TYPE: smtp
|
|
|
|
# GITEA__mailer__HOST: "${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}"
|
|
|
|
# GITEA__mailer__IS_TLS_ENABLED: true
|
|
|
|
# GITEA__mailer__USER: "${GITEA__mailer__USER:-apikey}"
|
|
|
|
# GITEA__mailer__PASSWD: "${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"
|
|
|
|
## Generete the value with
|
2023-02-04 11:25:50 +00:00
|
|
|
## docker run -it --rm forgejo/forgejo:1 forgejo generate secret SECRET_KEY
|
|
|
|
## docker run -it --rm forgejo/forgejo:1 forgejo generate secret INTERNAL_TOKEN
|
2022-08-15 10:01:39 +00:00
|
|
|
# GITEA__security__SECRET_KEY=[value returned by generate secret SECRET_KEY]
|
|
|
|
# GITEA__security__INTERNAL_TOKEN=[value returned by generate secret INTERNAL_TOKEN]
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- app_data:/data
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
- "3022:22"
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
networks:
|
2023-02-04 11:25:50 +00:00
|
|
|
- forgejo_net
|
2022-08-15 10:01:39 +00:00
|
|
|
|
|
|
|
db:
|
|
|
|
image: mysql:8
|
|
|
|
restart: always
|
|
|
|
environment:
|
2023-02-04 11:25:50 +00:00
|
|
|
MYSQL_ROOT_PASSWORD: forgejo
|
|
|
|
MYSQL_USER: forgejo
|
|
|
|
MYSQL_PASSWORD: forgejo
|
|
|
|
MYSQL_DATABASE: forgejo
|
2022-08-15 10:01:39 +00:00
|
|
|
volumes:
|
|
|
|
- db_data:/var/lib/mysql
|
|
|
|
networks:
|
2023-02-04 11:25:50 +00:00
|
|
|
- forgejo_net
|
2022-08-15 10:01:39 +00:00
|
|
|
|
|
|
|
networks:
|
2023-02-04 11:25:50 +00:00
|
|
|
forgejo_net:
|
2022-08-15 10:01:39 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
app_data:
|
|
|
|
db_data:
|