2024-07-06 21:10:44 +00:00
|
|
|
services:
|
|
|
|
db:
|
2024-08-03 15:37:27 +00:00
|
|
|
image: mariadb:lts
|
2024-07-06 21:10:44 +00:00
|
|
|
restart: always
|
|
|
|
healthcheck:
|
2024-08-03 15:37:27 +00:00
|
|
|
#test: ['CMD-SHELL', 'mysqladmin ping -h 127.0.0.1 --password="${DOTENV_MYSQL_ROOT_PASSWORD}" --silent']
|
|
|
|
test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized']
|
|
|
|
interval: 10s
|
2024-07-06 21:10:44 +00:00
|
|
|
retries: 5
|
2024-08-03 15:37:27 +00:00
|
|
|
timeout: 5s
|
|
|
|
start_period: 10s
|
2024-07-06 21:10:44 +00:00
|
|
|
volumes:
|
|
|
|
- db-data:/var/lib/mysql
|
2024-07-08 02:18:20 +00:00
|
|
|
- ./db/init:/docker-entrypoint-initdb.d/
|
2024-07-06 21:10:44 +00:00
|
|
|
networks:
|
|
|
|
- backnet
|
|
|
|
environment:
|
|
|
|
#- MYSQL_DATABASE=gitea
|
|
|
|
#- MYSQL_USER=gitea
|
|
|
|
#- MYSQL_PASSWORD=gitea
|
2024-07-07 00:06:07 +00:00
|
|
|
#- MYSQL_ROOT_PASSWORD=rootpass
|
|
|
|
- MYSQL_ROOT_PASSWORD=${DOTENV_MYSQL_ROOT_PASSWORD}
|
2024-07-06 21:10:44 +00:00
|
|
|
expose:
|
|
|
|
- 3306
|
|
|
|
- 33060
|
|
|
|
|
|
|
|
backend:
|
|
|
|
build:
|
|
|
|
context: backend
|
|
|
|
target: builder
|
2024-08-04 12:44:20 +00:00
|
|
|
# Next two are only debug, used without restart
|
|
|
|
stdin_open: true
|
|
|
|
tty: true
|
|
|
|
#restart: always
|
2024-07-30 12:58:32 +00:00
|
|
|
# Comment following line to use flask (1worker, dev), uncomment to use uwsgi (wsgi)
|
2024-08-04 11:39:49 +00:00
|
|
|
#command: ["uwsgi", "--http", "0.0.0.0:8000", "--master", "-p", "4", "-w", "microblog:app"]
|
2024-07-06 21:10:44 +00:00
|
|
|
environment:
|
|
|
|
- MYSQL_USER=flasku
|
2024-07-07 00:06:07 +00:00
|
|
|
#- MYSQL_PASSWORD=flaskp
|
|
|
|
- MYSQL_PASSWORD=${DOTENV_MYSQL_FLASK_PASSWORD}
|
2024-07-29 11:00:48 +00:00
|
|
|
- TOKEN_I=${DOTENV_TOKEN_I}
|
|
|
|
- TOKEN_C=${DOTENV_TOKEN_C}
|
2024-08-03 15:58:32 +00:00
|
|
|
- ADMIN_EMAIL=${ADMIN_EMAIL}
|
2024-08-03 18:45:37 +00:00
|
|
|
- FROM_ADDRESS=${GITEA_MAIL_FROM}
|
2024-07-06 21:10:44 +00:00
|
|
|
#ports:
|
|
|
|
# - 8000:8000
|
|
|
|
expose:
|
|
|
|
- 8000
|
|
|
|
networks:
|
|
|
|
- backnet
|
|
|
|
- frontnet
|
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
gutsub:
|
|
|
|
image: gitea/gitea:latest
|
|
|
|
container_name: gitea
|
|
|
|
restart: always
|
|
|
|
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
|
2024-07-07 00:06:07 +00:00
|
|
|
- GITEA__database__PASSWD=${DOTENV_MYSQL_GITEA_PASSWORD}
|
2024-07-06 21:10:44 +00:00
|
|
|
- GITEA__repository__DEFAULT_BRANCH=master
|
2024-07-07 21:45:46 +00:00
|
|
|
- GITEA__mailer__ENABLED=true
|
|
|
|
- GITEA__mailer__FROM=${GITEA_MAIL_FROM}
|
|
|
|
- GITEA__mailer__USER=
|
|
|
|
- GITEA__mailer__PROTOCOL=smtp
|
|
|
|
- GITEA__mailer__SMTP_ADDR=pmb
|
|
|
|
- GITEA__mailer__SMTP_PORT=25
|
2024-07-07 22:26:58 +00:00
|
|
|
- GITEA__service__REGISTER_EMAIL_CONFIRM=true
|
2024-07-07 23:52:42 +00:00
|
|
|
- GITEA__service__ENABLE_NOTIFY_MAIL=true
|
2024-07-06 21:10:44 +00:00
|
|
|
# To disable new users after setup:
|
|
|
|
#- GITEA__service__DISABLE_REGISTRATION=false
|
|
|
|
networks:
|
|
|
|
- backnet
|
|
|
|
- frontnet
|
|
|
|
volumes:
|
|
|
|
- ./gitea:/data
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
#ports:
|
|
|
|
# - "3000:3000"
|
|
|
|
# - "222:22"
|
|
|
|
depends_on:
|
|
|
|
db:
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
proxy:
|
|
|
|
build: proxy
|
|
|
|
restart: always
|
2024-08-03 15:37:27 +00:00
|
|
|
#volumes:
|
|
|
|
# - /home/finn/d/cert/var/lib/letsencrypt:/var/lib/letsencrypt
|
|
|
|
# - /home/finn/d/cert/etc/letsencrypt:/etc/letsencrypt
|
2024-07-06 21:10:44 +00:00
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
- 443:443
|
|
|
|
depends_on:
|
|
|
|
- backend
|
|
|
|
networks:
|
|
|
|
- frontnet
|
|
|
|
|
2024-07-07 21:45:46 +00:00
|
|
|
pmb:
|
2024-07-29 11:00:48 +00:00
|
|
|
#build:
|
|
|
|
# args:
|
|
|
|
# GPG_PP: $BUILD_GPG_PP
|
|
|
|
# context: pmb-pf
|
|
|
|
# dockerfile: Dockerfile
|
|
|
|
image: site_pmb:latest
|
2024-07-07 21:45:46 +00:00
|
|
|
expose:
|
|
|
|
- "25"
|
|
|
|
env_file:
|
2024-07-08 02:18:20 +00:00
|
|
|
- ./pmb-pf/.env
|
2024-07-07 21:45:46 +00:00
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- pmb-root:/root
|
2024-07-08 02:18:20 +00:00
|
|
|
- /etc/localtime:/etc/localtime:ro
|
2024-07-07 21:45:46 +00:00
|
|
|
networks:
|
|
|
|
- backnet
|
|
|
|
|
2024-07-06 21:10:44 +00:00
|
|
|
volumes:
|
|
|
|
db-data:
|
2024-07-07 21:45:46 +00:00
|
|
|
pmb-root:
|
2024-07-06 21:10:44 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
backnet:
|
|
|
|
frontnet:
|