-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (63 loc) · 1.58 KB
/
docker-compose.yml
File metadata and controls
68 lines (63 loc) · 1.58 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
services:
server:
build:
context: ./server
dockerfile: Dockerfile
ports:
- "8008:8000"
environment:
- PYTHONUNBUFFERED=1
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://wplace:wplace123@postgres:5432/wplace_master
# NOTE: La aplicación esperaba quizá 'wplace'. init.sql ya crea la DB 'wplace' para compatibilidad.
depends_on:
- redis
- postgres
volumes:
- ./server:/app
networks:
- wplace-network
restart: unless-stopped
ui:
build:
context: ./ui
dockerfile: Dockerfile
ports:
- "3004:3000"
depends_on:
- server
networks:
- wplace-network
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- wplace-network
restart: unless-stopped
command: redis-server --appendonly yes
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_DB=wplace_master
- POSTGRES_USER=wplace
- POSTGRES_PASSWORD=wplace123
# Si quieres que el contenedor arranque directamente sobre 'wplace' cambia POSTGRES_DB, pero mantenemos wplace_master y scripts crean 'wplace'.
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./init-extra.sql:/docker-entrypoint-initdb.d/10-init-extra.sql
networks:
- wplace-network
restart: unless-stopped
volumes:
redis_data:
postgres_data:
networks:
wplace-network:
driver: bridge