feat: Adding logging solution + alert for mobile phones
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
# Keep `db` as the first service: clearer dependency order and predictable compose overrides.
|
||||
# Secrets come from .env (auto-loaded by Compose) — never hard-code credentials here.
|
||||
# Copy .env.example to .env and fill in values before running.
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: game
|
||||
POSTGRES_PASSWORD: game
|
||||
POSTGRES_DB: star_wars_grid
|
||||
POSTGRES_USER: ${POSTGRES_USER:-game}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-star_wars_grid}
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U game -d star_wars_grid"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-game} -d ${POSTGRES_DB:-star_wars_grid}"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
@@ -20,15 +21,15 @@ services:
|
||||
users_db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: users
|
||||
POSTGRES_PASSWORD: users
|
||||
POSTGRES_DB: star_wars_users
|
||||
POSTGRES_USER: ${POSTGRES_USERS_USER:-users}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_USERS_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_USERS_DB:-star_wars_users}
|
||||
volumes:
|
||||
- ./data/postgres_users:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5433:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U users -d star_wars_users"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USERS_USER:-users} -d ${POSTGRES_USERS_DB:-star_wars_users}"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 15
|
||||
@@ -37,12 +38,12 @@ services:
|
||||
app:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "${PORT:-8080}:8080"
|
||||
environment:
|
||||
DATABASE_URL: postgres://game:game@db:5432/star_wars_grid
|
||||
USERS_DATABASE_URL: postgres://users:users@users_db:5432/star_wars_users
|
||||
JWT_SECRET: change_me_in_production_please
|
||||
PORT: "8080"
|
||||
DATABASE_URL: "postgres://${POSTGRES_USER:-game}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-star_wars_grid}"
|
||||
USERS_DATABASE_URL: "postgres://${POSTGRES_USERS_USER:-users}:${POSTGRES_USERS_PASSWORD}@users_db:5432/${POSTGRES_USERS_DB:-star_wars_users}"
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
PORT: "${PORT:-8080}"
|
||||
CONFIG_FILE_PATH: /app/config/game.settings.json
|
||||
volumes:
|
||||
- ./config:/app/config
|
||||
|
||||
Reference in New Issue
Block a user