forked from Bitcoindefi/OpenAO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (46 loc) · 1.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (46 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
services:
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-aoweb}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- "127.0.0.1:5432:5432"
volumes:
# postgres:18+ exige el mount en /var/lib/postgresql, NO en .../data.
# Los datos quedan en un subdirectorio por version mayor para que
# "pg_upgrade --link" no cruce un limite de punto de montaje.
# Con la ruta vieja el contenedor no arranca.
- postgres_data:/var/lib/postgresql
- ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-aoweb}",
]
interval: 10s
timeout: 5s
retries: 10
api:
build:
context: .
restart: unless-stopped
environment:
NODE_ENV: production
PORT: 3100
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-aoweb}
TOKEN_AUTH: ${TOKEN_AUTH:-changeme}
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:3000}
GAME_DATA_ADMIN_EMAIL: ${GAME_DATA_ADMIN_EMAIL:-}
GAME_DATA_ADMIN_ACCOUNT_ID: ${GAME_DATA_ADMIN_ACCOUNT_ID:-}
GAME_DATA_ADMIN_PROXY_TOKEN: ${GAME_DATA_ADMIN_PROXY_TOKEN}
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:3100:3100"
volumes:
postgres_data: