Simplify docker compose (#9602)

Seems like Spilo doesn't take into account the password?!
This commit is contained in:
Félix Malfait
2025-01-14 12:19:57 +01:00
committed by GitHub
parent 35d165dbe9
commit 459d0b18cf
2 changed files with 8 additions and 7 deletions

View File

@ -1,4 +1,3 @@
version: "3.9"
name: twenty
services:
@ -14,7 +13,7 @@ services:
&& chown -R 1000:1000 /tmp/docker-data"
server:
image: twentycrm/twenty:${TAG}
image: twentycrm/twenty:${TAG:-latest}
volumes:
- server-local-data:/app/packages/twenty-server/${STORAGE_LOCAL_PATH:-.local-storage}
- docker-data:/app/docker-data
@ -45,7 +44,7 @@ services:
restart: always
worker:
image: twentycrm/twenty:${TAG}
image: twentycrm/twenty:${TAG:-latest}
command: ["yarn", "worker:prod"]
environment:
PG_DATABASE_URL: postgres://${PGUSER_SUPERUSER:-postgres}:${PGPASSWORD_SUPERUSER:-postgres}@${PG_DATABASE_HOST:-db:5432}/default
@ -67,7 +66,7 @@ services:
restart: always
db:
image: twentycrm/twenty-postgres-spilo:${TAG}
image: twentycrm/twenty-postgres-spilo:${TAG:-latest}
volumes:
- db-data:/home/postgres/pgdata
environment:

View File

@ -90,10 +90,12 @@ else
fi
# Generate random strings for secrets
echo "# === Randomly generated secrets ===" >>.env
echo "# === Randomly generated secret ===" >>.env
echo "APP_SECRET=$(openssl rand -base64 32)" >>.env
echo "" >>.env
echo "PGPASSWORD_SUPERUSER=$(openssl rand -hex 16)" >>.env
# Issue with Postgres spilo?
#echo "" >>.env
#echo "PGPASSWORD_SUPERUSER=$(openssl rand -hex 16)" >>.env
echo -e "\t• .env configuration completed"