lwb5-in-2025/docker/compose.yml

74 lines
1.7 KiB
YAML

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
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