76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
---
|
|
services:
|
|
app:
|
|
image: nocobase/nocobase:1.8.1
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
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}"
|
|
environment:
|
|
# Database type, supports postgres, mysql, mariadb
|
|
DB_DIALECT: postgres
|
|
# Database host, can be replaced with the IP of an existing database server
|
|
DB_HOST: postgres
|
|
# Database port
|
|
DB_PORT: 5432
|
|
# Database name
|
|
DB_DATABASE: nocobase
|
|
# Database user
|
|
DB_USER: nocobase
|
|
# Timezone
|
|
TZ: UTC
|
|
entrypoint: [ "/entrypoint.sh"]
|
|
configs:
|
|
- source: entrypoint
|
|
target: /entrypoint.sh
|
|
mode: 0555
|
|
secrets:
|
|
- app_key
|
|
- db_password
|
|
volumes:
|
|
- data_app:/app/nocobase/storage
|
|
networks:
|
|
- nocobase
|
|
- proxy
|
|
postgres:
|
|
image: postgres:16
|
|
restart: always
|
|
command: postgres -c wal_level=logical
|
|
environment:
|
|
POSTGRES_USER: nocobase
|
|
POSTGRES_DB: nocobase
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
|
secrets:
|
|
- db_password
|
|
volumes:
|
|
- data_db:/var/lib/postgresql/data
|
|
networks:
|
|
- nocobase
|
|
|
|
volumes:
|
|
data_db:
|
|
data_app:
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|
|
nocobase:
|
|
|
|
configs:
|
|
entrypoint:
|
|
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
|
|
file: entrypoint.sh
|
|
|
|
secrets:
|
|
app_key:
|
|
external: true
|
|
name: ${STACK_NAME}_app_key_${APP_KEY_VERSION}
|
|
db_password:
|
|
external: true
|
|
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
|