-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
62 lines (52 loc) · 1.09 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
58
59
60
61
62
version: '3.7'
services:
postgresql:
image: postgres:10.5-alpine
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_MULTIPLE_DATABASES=db1,db2
volumes:
- ./postgresql:/docker-entrypoint-initdb.d
redis:
image: redis
ports:
- "6379"
volumes:
- redis_data:/data
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
- BACKEND_IP=0.0.0.0
- BACKEND_PORT=8081
- DEBUG=True
- DATABASE_PASSWORD=password
- DATABASE_USER=user
- DATABASE_DB=db1
- DATABASE_HOST=postgresql
- DATABASE_TEST_DB=db2
- DATABASE_TEST_HOST=postgresql
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
- postgresql
volumes:
- ./backend:/app
nginx:
image: nginx:alpine
ports:
- '80:80'
volumes:
- type: bind
source: ./nginx/default.conf
target: /etc/nginx/conf.d/default.conf
depends_on:
- postgresql
- backend
volumes:
db:
redis_data: