Spaces:
Runtime error
Runtime error
Greg commited on
Commit ·
4fa64cd
1
Parent(s): da6011c
feat(infra): replace MySQL with PostgreSQL 16 in docker-compose
Browse files- docker-compose.yml +28 -25
docker-compose.yml
CHANGED
|
@@ -1,38 +1,43 @@
|
|
| 1 |
services:
|
| 2 |
-
|
| 3 |
-
image:
|
| 4 |
-
restart: unless-stopped
|
| 5 |
environment:
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
MYSQL_PASSWORD: talos_secret
|
| 10 |
-
TZ: America/Caracas
|
| 11 |
-
ports:
|
| 12 |
-
- "4306:3306"
|
| 13 |
volumes:
|
| 14 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
redis:
|
| 17 |
image: redis:7-alpine
|
| 18 |
-
restart: unless-stopped
|
| 19 |
ports:
|
| 20 |
-
- "
|
| 21 |
|
| 22 |
backend:
|
| 23 |
build:
|
| 24 |
context: ./backend
|
| 25 |
dockerfile: Dockerfile
|
| 26 |
-
restart: unless-stopped
|
| 27 |
depends_on:
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
| 30 |
environment:
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
| 36 |
ports:
|
| 37 |
- "8000:8000"
|
| 38 |
volumes:
|
|
@@ -42,15 +47,13 @@ services:
|
|
| 42 |
build:
|
| 43 |
context: ./frontend
|
| 44 |
dockerfile: Dockerfile
|
| 45 |
-
restart: unless-stopped
|
| 46 |
depends_on:
|
| 47 |
- backend
|
| 48 |
ports:
|
| 49 |
-
- "
|
| 50 |
volumes:
|
| 51 |
- ./frontend:/app
|
| 52 |
- /app/node_modules
|
| 53 |
|
| 54 |
-
|
| 55 |
volumes:
|
| 56 |
-
|
|
|
|
| 1 |
services:
|
| 2 |
+
postgres:
|
| 3 |
+
image: postgres:16-alpine
|
|
|
|
| 4 |
environment:
|
| 5 |
+
POSTGRES_USER: talos
|
| 6 |
+
POSTGRES_PASSWORD: talos_demo_2026
|
| 7 |
+
POSTGRES_DB: talos_access
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
volumes:
|
| 9 |
+
- talos_pg_data:/var/lib/postgresql/data
|
| 10 |
+
ports:
|
| 11 |
+
- "5432:5432"
|
| 12 |
+
healthcheck:
|
| 13 |
+
test: ["CMD-SHELL", "pg_isready -U talos -d talos_access"]
|
| 14 |
+
interval: 5s
|
| 15 |
+
timeout: 5s
|
| 16 |
+
retries: 10
|
| 17 |
|
| 18 |
redis:
|
| 19 |
image: redis:7-alpine
|
|
|
|
| 20 |
ports:
|
| 21 |
+
- "6379:6379"
|
| 22 |
|
| 23 |
backend:
|
| 24 |
build:
|
| 25 |
context: ./backend
|
| 26 |
dockerfile: Dockerfile
|
|
|
|
| 27 |
depends_on:
|
| 28 |
+
postgres:
|
| 29 |
+
condition: service_healthy
|
| 30 |
+
redis:
|
| 31 |
+
condition: service_started
|
| 32 |
environment:
|
| 33 |
+
POSTGRES_HOST: postgres
|
| 34 |
+
POSTGRES_PORT: 5432
|
| 35 |
+
POSTGRES_USER: talos
|
| 36 |
+
POSTGRES_PASSWORD: talos_demo_2026
|
| 37 |
+
POSTGRES_DB: talos_access
|
| 38 |
+
JWT_SECRET_KEY: ${JWT_SECRET_KEY:-dev-only-change-me}
|
| 39 |
+
SEED_DEMO: "1"
|
| 40 |
+
CORS_ORIGINS: '["*"]'
|
| 41 |
ports:
|
| 42 |
- "8000:8000"
|
| 43 |
volumes:
|
|
|
|
| 47 |
build:
|
| 48 |
context: ./frontend
|
| 49 |
dockerfile: Dockerfile
|
|
|
|
| 50 |
depends_on:
|
| 51 |
- backend
|
| 52 |
ports:
|
| 53 |
+
- "5173:5173"
|
| 54 |
volumes:
|
| 55 |
- ./frontend:/app
|
| 56 |
- /app/node_modules
|
| 57 |
|
|
|
|
| 58 |
volumes:
|
| 59 |
+
talos_pg_data:
|