mirror of
https://github.com/Snouzy/workout-cool.git
synced 2026-05-19 14:40:35 +00:00
Remove unnecessary values from docker compose. Make env file more parametrized. (#96)
This commit is contained in:
+6
-1
@@ -1,6 +1,11 @@
|
||||
# Database Configuration
|
||||
POSTGRES_USER=my-user
|
||||
POSTGRES_PASSWORD=my-password
|
||||
POSTGRES_DB=workout-cool
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
# Format: postgresql://USER:PASSWORD@HOST:PORT/DATABASE
|
||||
DATABASE_URL=postgresql://username:password@localhost:5432/workout_cool
|
||||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${POSTGRES_DB}
|
||||
|
||||
# Authentication
|
||||
# The URL where your application is running
|
||||
|
||||
+2
-5
@@ -3,17 +3,14 @@ services:
|
||||
image: postgres:15
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
environment:
|
||||
POSTGRES_USER: username
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DB: workout_cool
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U username -d workout_cool"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
env_file: .env
|
||||
|
||||
workout_cool:
|
||||
build:
|
||||
|
||||
Reference in New Issue
Block a user