forked from django-bft/django-bft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
56 lines (54 loc) · 1.19 KB
/
docker-compose.yaml
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
version: '3'
services:
django:
container_name: django
build:
context: .
dockerfile: django.Dockerfile
command: sh -c "python manage.py migrate && python manage.py collectstatic --no-input && python manage.py runserver 0.0.0.0:8000"
image: ${DOCKER_IMAGE_NAME}
volumes:
- .:/code
# ports:
# - 8000:8000
networks:
- bft_network
env_file:
- .env
depends_on:
- db
nginx:
image: nginx:latest
container_name: nginx
build:
context: .
dockerfile: nginx.Dockerfile
ports:
- 80:80
- 443:443
volumes:
- ./nginx/fullchain.pem:/etc/letsencrypt/live/fullchain.pem
- ./nginx/privkey.pem:/etc/letsencrypt/live/privkey.pem
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./nginx/log:/var/log/nginx
- ./files:/code/files
- ./static:/code/static
networks:
- bft_network
depends_on:
- django
env_file:
- .env
db:
image: postgres:latest
container_name: db
# ports:
# - "5432:5432"
env_file:
- .env
volumes:
- ./data:/var/lib/postgresql/data
networks:
- bft_network
networks:
bft_network: