60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
---
|
|
|
|
version: '3.4'
|
|
|
|
services:
|
|
web:
|
|
build: .
|
|
image: glenux/service-forgejo
|
|
environment:
|
|
USER_UID: 1000
|
|
USER_GID: 1000
|
|
GITEA__database__DB_TYPE: mysql
|
|
GITEA__database__HOST: db:3306
|
|
GITEA__database__NAME: forgejo
|
|
GITEA__database__USER: forgejo
|
|
GITEA__database__PASSWD: forgejo
|
|
# 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
|
|
## docker run -it --rm forgejo/forgejo:1 forgejo generate secret SECRET_KEY
|
|
## docker run -it --rm forgejo/forgejo:1 forgejo generate secret INTERNAL_TOKEN
|
|
# 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:
|
|
- forgejo_net
|
|
|
|
db:
|
|
image: mysql:8
|
|
restart: always
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: forgejo
|
|
MYSQL_USER: forgejo
|
|
MYSQL_PASSWORD: forgejo
|
|
MYSQL_DATABASE: forgejo
|
|
volumes:
|
|
- db_data:/var/lib/mysql
|
|
networks:
|
|
- forgejo_net
|
|
|
|
networks:
|
|
forgejo_net:
|
|
|
|
volumes:
|
|
app_data:
|
|
db_data:
|