-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (50 loc) · 1.21 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
version: '3.9'
services:
postgres:
env_file:
- .env
container_name: ${APP_NAME}-postgres
image: postgres:${POSTGRES_VERSION}
volumes:
- ./data_postgres:/var/lib/postgresql/data
ports: # comment or delete if you are not connecting to the database from the host
- 5432:5432
restart: on-failure
redis:
env_file:
- .env
container_name: ${APP_NAME}-redis
image: redis:${REDIS_VERSION}
ports: # comment or delete if you are not connecting to the database from the host
- 6379:6379
command: redis-server --save 20 1 --loglevel warning
volumes:
- ./data_redis:/data
restart: on-failure
backend:
env_file:
- .env
container_name: ${APP_NAME}-backend
build:
context: ./backend
dockerfile: Dockerfile
depends_on:
- postgres
- redis
ports:
- 5000:${APP_BACKEND_PORT}
restart: on-failure
frontend:
env_file:
- .env
container_name: ${APP_NAME}-frontend
build:
context: ./frontend
dockerfile: Dockerfile
args:
backend_core_url: ${BACKEND_CORE_URL}
depends_on:
- backend
ports:
- 3000:${APP_FRONTEND_PORT}
restart: on-failure