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