lwb6-in-2025/docker/compose.yml

75 lines
1.5 KiB
YAML

name: lwb6
services:
db:
build:
context: ../
dockerfile: docker/Dockerfile.database
restart: always
shm_size: 128mb
volumes:
- database:/var/lib/postgresql/data
environment:
LW_DB_NAME: ${LW_DB_NAME}
LW_DB_USER: ${LW_DB_USER}
LW_DB_USER_PASS_FILE: /run/secrets/lw_db_password
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
- lw_db_password
backend:
build:
context: ..
dockerfile: docker/Dockerfile.application
target: backend
restart: always
user: "1000"
volumes:
- init-state:/app/state
environment:
LW_CONFIGURE: 1
LW_DB_HOST: db
LW_DB_NAME: ${LW_DB_NAME}
LW_DB_USER: ${LW_DB_USER}
LW_DB_PASSWORD_FILE: /run/secrets/lw_db_password
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_AUTH: ${SMTP_AUTH}
SMTP_USER: ${SMTP_USER}
SMTP_PASSWORD: ${SMTP_PASSWORD}
secrets:
- lw_db_password
web-main:
build:
context: ..
dockerfile: docker/Dockerfile.application
target: lwmain
restart: always
environment:
LW_BACKEND_HOST: backend
ports:
- "8080:8080"
web-admin:
build:
context: ..
dockerfile: docker/Dockerfile.application
target: lwadmin
restart: always
environment:
LW_BACKEND_HOST: backend
ports:
- "8081:8080"
volumes:
database:
init-state:
secrets:
db_password:
environment: DB_PASSWORD
lw_db_password:
environment: LW_DB_PASSWORD