-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
127 lines (120 loc) · 2.79 KB
/
docker-compose.yml
File metadata and controls
127 lines (120 loc) · 2.79 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
---
services:
postgres:
container_name: chessclouds_postgres
image: postgres:17
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- chessclouds_data:/var/lib/postgresql/data
ports:
- '5432:5432'
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
networks:
- chess_network
web:
container_name: chessclouds_web
build:
context: ./web
dockerfile: Dockerfile
# env_file:
# - .env
environment:
- NEXT_PUBLIC_GOOGLE_AUTH_ENDPOINT=${NEXT_PUBLIC_GOOGLE_AUTH_ENDPOINT}
- DATABASE_URL=${DATABASE_URL}
- NEXT_PUBLIC_ENGINE_API_URL=${NEXT_PUBLIC_ENGINE_API_URL}
ports:
- '3000:3000'
depends_on:
postgres:
condition: service_healthy
networks:
- chess_network
migrate:
image: oven/bun:1-slim
container_name: chessclouds_migrater
working_dir: /app
volumes:
- ./web:/app
env_file:
- .env
networks:
- chess_network
entrypoint:
- sh
- -c
- |
apt-get update && apt-get install -y openssl ca-certificates && rm -rf /var/lib/apt/lists/*
bunx prisma migrate deploy
bunx prisma generate
bunx prisma studio
ports:
- '5555:5555'
depends_on:
postgres:
condition: service_healthy
ws-server:
container_name: chessclouds_socket_server
build:
context: ./ws_server
dockerfile: Dockerfile
args:
SQLX_OFFLINE: "true"
DATABASE_URL: ${DATABASE_URL}
env_file:
- .env
environment:
DATABASE_URL: ${DATABASE_URL}
ports:
- '8000:8000'
depends_on:
postgres:
condition: service_healthy
web:
condition: service_started
networks:
- chess_network
matchmaking:
container_name: chessclouds_matchmaker
build:
context: ./matchmaking
dockerfile: Dockerfile
args:
SQLX_OFFLINE: "true"
DATABASE_URL: ${DATABASE_URL}
env_file:
- .env
environment:
DATABASE_URL: ${DATABASE_URL}
ports:
- '8001:8001'
depends_on:
postgres:
condition: service_healthy
web:
condition: service_started
networks:
- chess_network
engine:
container_name: chessclouds_engine
build:
context: ./engine
dockerfile: Dockerfile
ports:
- '4000:4000'
networks:
- chess_network
networks:
chess_network:
driver: bridge
volumes:
chessclouds_data: