lwb5-in-2025/docker/compose.yml

94 lines
2.3 KiB
YAML
Raw Permalink Normal View History

name: legacyworlds
services:
db:
build:
context: ../
dockerfile: docker/Dockerfile.database
restart: always
shm_size: 128mb
volumes:
- database:/var/lib/postgresql/data
environment:
LW_ADMIN_MAIL: ${LW_ADMIN_MAIL}
LW_ADMIN_NAME: ${LW_ADMIN_NAME}
LW_ADMIN_PASSWORD_FILE: /run/secrets/lw_admin_password
LW_DB_ADMIN_PASS_FILE: /run/secrets/lw_db_admin_pass
LW_DB_USER_PASS_FILE: /run/secrets/lw_db_user_pass
LW_PEACEKEEPERS_PASSWORD_FILE: /run/secrets/lw_peacekeepers_password
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
- lw_db_user_pass
- lw_db_admin_pass
- lw_admin_password
- lw_peacekeepers_password
game:
build:
context: ../
dockerfile: docker/Dockerfile.game
restart: always
ports:
- "80:80"
- "81:81"
volumes:
- type: bind
source: ../game
target: /opt/lwb5
- type: tmpfs
target: /tmp
tmpfs:
size: 1g
- planets:/opt/lwb5/site/static/beta5/pics/pl:ro
- pgen:/var/spool/pgen:rw
environment:
LW_DB_ADMIN_PASS_FILE: /run/secrets/lw_db_admin_pass
LW_DB_HOST: db
LW_DB_USER_PASS_FILE: /run/secrets/lw_db_user_pass
LW_MAIL_FROM: ${LW_MAIL_FROM}
LW_SEND_MAIL: ${LW_SEND_MAIL}
LW_STATIC_URL: ${LW_STATIC_URL}
SMTP_AUTH: ${SMTP_AUTH}
SMTP_ENVFROM: ${SMTP_ENVFROM}
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_TLS: ${SMTP_TLS}
SMTP_USER: ${SMTP_USER}
secrets:
- lw_db_user_pass
- lw_db_admin_pass
- smtp_password
planetgen:
build:
context: ..
dockerfile: docker/Dockerfile.planetgen
restart: always
volumes:
- pgen:/var/spool/pgen/input:rw
- planets:/var/spool/pgen/output:rw
environment:
PGEN_INPUT: /var/spool/pgen/input
PGEN_OUTPUT: /var/spool/pgen/output
volumes:
pgen:
planets:
database:
secrets:
db_password:
environment: DB_PASSWORD
lw_db_user_pass:
environment: LW_DB_USER_PASS
lw_db_admin_pass:
environment: LW_DB_ADMIN_PASS
lw_admin_password:
environment: LW_ADMIN_PASSWORD
lw_peacekeepers_password:
environment: LW_PEACEKEEPERS_PASSWORD
smtp_password:
environment: SMTP_PASSWORD