-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
57 lines (52 loc) · 1.11 KB
/
docker-compose.yml
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
services:
nginx:
image: nginx:alpine
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf
ports:
- '8080:80'
depends_on:
- frontend
- backend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
env_file:
- .env
environment:
- NEXT_PUBLIC_COMMIT_HASH=${NEXT_PUBLIC_COMMIT_HASH}
volumes:
- .:/app:cached # Mount the root folder that contains .git
- /app/frontend/node_modules
ports:
- '3000:3000'
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file:
- .env
volumes:
- .:/app:cached # Mount the root folder that contains .git
ports:
- '8000:8000'
db:
image: postgres:16.3-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
redis:
image: "redis:alpine"
ports:
- "6379:6379"
volumes:
- redis_data:/data
volumes:
db_data: {}
redis_data: {}