109 lines
3.3 KiB
YAML
109 lines
3.3 KiB
YAML
---
|
|
services:
|
|
app:
|
|
image: ghcr.io/gitroomhq/postiz-app:v1.65.1
|
|
networks:
|
|
- proxy
|
|
- postiz-network
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=5000"
|
|
- "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}"
|
|
## Redirect from EXTRA_DOMAINS to DOMAIN
|
|
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
|
## Redirect HTTP to HTTPS
|
|
# - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.scheme=https"
|
|
# - "traefik.http.middlewares.${STACK_NAME}-redirect.redirectscheme.permanent=true"
|
|
## When you're ready for release, run "abra recipe sync <name>" to set this
|
|
- "coop-cloud.${STACK_NAME}.version="
|
|
## Enable backups: https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-configure-backuprestore
|
|
# - "backupbot.backup=true"
|
|
# - "backupbot.backup.path=/some/path"
|
|
environment:
|
|
MAIN_URL: "https://${DOMAIN}"
|
|
FRONTEND_URL: "https://${DOMAIN}"
|
|
NEXT_PUBLIC_BACKEND_URL: "https://${DOMAIN}/api"
|
|
|
|
REDIS_URL: "redis://postiz-redis:6379"
|
|
BACKEND_INTERNAL_URL: "http://localhost:3000"
|
|
IS_GENERAL: "true" # Required for self-hosting.
|
|
DISABLE_REGISTRATION: "true" # Only allow single registration, then disable signup
|
|
# The container images are pre-configured to use /uploads for file storage.
|
|
# You probably should not change this unless you have a really good reason!
|
|
STORAGE_PROVIDER: "local"
|
|
UPLOAD_DIRECTORY: "/uploads"
|
|
NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads"
|
|
secrets:
|
|
- jwt_secret
|
|
- db_password
|
|
volumes:
|
|
- postiz-config:/config/
|
|
- postiz-uploads:/uploads/
|
|
entrypoint: [ "/entrypoint.sh"]
|
|
configs:
|
|
- source: entrypoint
|
|
target: /entrypoint.sh
|
|
mode: 0555
|
|
|
|
postiz-postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
|
|
POSTGRES_USER: postiz-user
|
|
POSTGRES_DB: postiz-db-local
|
|
secrets:
|
|
- db_password
|
|
volumes:
|
|
- postgres-volume:/var/lib/postgresql/data
|
|
networks:
|
|
- postiz-network
|
|
healthcheck:
|
|
test: pg_isready -U postiz-user -d postiz-db-local
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
postiz-redis:
|
|
image: redis:7.2
|
|
healthcheck:
|
|
test: redis-cli ping
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
volumes:
|
|
- postiz-redis-data:/data
|
|
networks:
|
|
- postiz-network
|
|
networks:
|
|
postiz-network:
|
|
external: false
|
|
proxy:
|
|
external: true
|
|
|
|
volumes:
|
|
postgres-volume:
|
|
external: false
|
|
postiz-redis-data:
|
|
external: false
|
|
postiz-config:
|
|
external: false
|
|
postiz-uploads:
|
|
external: false
|
|
|
|
configs:
|
|
entrypoint:
|
|
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
|
|
file: entrypoint.sh
|
|
|
|
secrets:
|
|
jwt_secret:
|
|
external: true
|
|
name: ${STACK_NAME}_jwt_secret_${JWT_SECRET_VERSION}
|
|
db_password:
|
|
external: true
|
|
name: ${STACK_NAME}_db_password_${DB_PASSWORD_VERSION}
|