-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (55 loc) · 1.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
59 lines (55 loc) · 1.3 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
services:
db:
image: postgres:17
container_name: learn-platform-db
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mysecretpassword
healthcheck:
test: ["CMD-SHELL", "pg_isready -U myuser -d mydatabase"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- learn-platform-network
ports:
- "5432:5432"
server:
build:
context: .
dockerfile: ./apps/server/Dockerfile
container_name: learn-platform-server
environment:
DATABASE_URL: "postgresql://myuser:mysecretpassword@db:5432/mydatabase"
ports:
- "9999:9999"
depends_on:
db:
condition: service_healthy
networks:
- learn-platform-network
restart: unless-stopped
client:
build:
context: .
dockerfile: ./apps/client/Dockerfile
args:
VITE_API_URL: http://localhost:9999/api
VITE_BETTER_AUTH_URL: http://localhost:9999
container_name: learn-platform-client
ports:
- "5173:5173"
depends_on:
- server
networks:
- learn-platform-network
restart: unless-stopped
networks:
learn-platform-network:
driver: bridge
volumes:
postgres-data: