Files
rei3-recipe/compose.yml

56 lines
1.4 KiB
YAML

---
version: "3.8"
services:
r3_db:
image: postgres:16
networks:
- internal
environment:
POSTGRES_DB: ${R3_DB_NAME:-app}
POSTGRES_USER: ${R3_DB_USER:-app}
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
volumes:
- data_db:/var/lib/postgresql/data
app:
image: git.coopcloud.tech/devydave/rei3-recipe:${R3_VERSION}
networks:
- proxy
- internal
deploy:
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
command: "/opt/r3/r3 -run -http -config /opt/r3/data/config_${CONFIG_JSON_VERSION}.json"
configs:
- source: config_json
target: /opt/r3/config_template.json
secrets:
- db_password
volumes:
- data_app:/opt/r3/data
networks:
proxy:
external: true
internal:
configs:
config_json:
name: ${STACK_NAME}_config_${CONFIG_JSON_VERSION}
file: config.json.tmpl
template_driver: golang
volumes:
data_db:
data_app:
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}