chore: selfhost compose backward compatibility (#9098)

This commit is contained in:
forehalo
2024-12-11 06:24:53 +00:00
parent 216e09e1af
commit eee0ed45ee

View File

@@ -19,6 +19,7 @@ services:
env_file: env_file:
- .env - .env
environment: environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine} - DATABASE_URL=postgresql://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-affine}
restart: unless-stopped restart: unless-stopped
@@ -43,6 +44,9 @@ services:
container_name: redis container_name: redis
healthcheck: healthcheck:
test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping'] test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping']
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped restart: unless-stopped
postgres: postgres:
@@ -61,7 +65,7 @@ services:
healthcheck: healthcheck:
test: test:
['CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "${DB_DATABASE:-affine}"] ['CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "${DB_DATABASE:-affine}"]
interval: 1m interval: 10s
start_interval: 10s timeout: 5s
start_period: 1m retries: 5
restart: unless-stopped restart: unless-stopped