-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-deploy.yml
50 lines (49 loc) · 1 KB
/
docker-compose-deploy.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
version: '3'
services:
web:
build:
context: .
dockerfile: Dockerfile
restart: always
image: messages-web-image
container_name: messages-web-container
volumes:
- static-data:/usr/src/vol/web
environment:
- DEBUG=${DEBUG}
- DB_HOST=db
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- SECRET_KEY=${SECRET_KEY}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
depends_on:
- db
redis:
image: redis:7
restart: always
container_name: messages-redis-container
ports:
- 6379:6379
db:
image: postgres:15
restart: always
volumes:
- db_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
proxy:
build:
context: ./proxy
restart: always
depends_on:
- web
ports:
- 80:8000
volumes:
- static-data:/vol/static
volumes:
static-data:
db_data: