Skip to content

Commit

Permalink
fix: postiz service
Browse files Browse the repository at this point in the history
For some reason, Postiz hardcodes username for Postgres and Redis in their code, so we have to use their usernames to make it work.
  • Loading branch information
peaklabs-dev committed Nov 27, 2024
1 parent 0d6c21d commit 29217ff
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions templates/compose/postiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ services:
- FRONTEND_URL=${SERVICE_FQDN_POSTIZ}
- NEXT_PUBLIC_BACKEND_URL=${SERVICE_FQDN_POSTIZ}/api
- JWT_SECRET=${SERVICE_PASSWORD_JWTSECRET}
- DATABASE_URL=postgresql://${SERVICE_USER_POSTGRESQL}:${SERVICE_PASSWORD_POSTGRESQL}@postgres:5432/${POSTGRESQL_DATABASE:-postiz-db}
# Changed Redis URL to use default username
- REDIS_URL=redis://${SERVICE_USER_REDIS}:${SERVICE_PASSWORD_REDIS}@redis:6379
- DATABASE_URL=postgresql://postgres:${SERVICE_PASSWORD_POSTGRESQL}@postgres:5432/${POSTGRESQL_DATABASE:-postiz-db}
- REDIS_URL=redis://default:${SERVICE_PASSWORD_REDIS}@redis:6379
- BACKEND_INTERNAL_URL=http://localhost:3000

# Cloudflare R2 Settings
Expand Down Expand Up @@ -75,7 +74,7 @@ services:
# Misc Settings
- NEXT_PUBLIC_DISCORD_SUPPORT=${NEXT_PUBLIC_DISCORD_SUPPORT}
- NEXT_PUBLIC_POLOTNO=${NEXT_PUBLIC_POLOTNO}
- IS_GENERAL=${IS_GENERAL:-true}
- IS_GENERAL=true
- NX_ADD_PLUGINS=${NX_ADD_PLUGINS:-false}

# Payment Settings
Expand Down Expand Up @@ -106,13 +105,11 @@ services:
volumes:
- postiz_postgresql_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${SERVICE_USER_POSTGRESQL}
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRESQL}
- POSTGRES_DB=${POSTGRESQL_DATABASE:-postiz-db}
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${SERVICE_USER_POSTGRESQL} -d ${POSTGRESQL_DATABASE:-postiz-db}
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB:-postiz-db}"]
interval: 5s
timeout: 20s
retries: 10
Expand All @@ -121,7 +118,6 @@ services:
image: redis:7.2
environment:
- REDIS_PASSWORD=${SERVICE_PASSWORD_REDIS}
- REDIS_USER=${SERVICE_USER_REDIS}
command: redis-server --requirepass ${SERVICE_PASSWORD_REDIS}
volumes:
- postiz_redis_data:/data
Expand Down

0 comments on commit 29217ff

Please sign in to comment.