-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (62 loc) · 2.05 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
63
64
65
66
networks:
pankb-net:
name: pankb-net
services:
django_gunicorn:
container_name: pankb-web
build:
context: .
image: pankb_web:latest
restart: always # for the container to be up and running again even after the VM is brought down
volumes:
- ./static:/static # a folder, where the static content will be served from
# map a folder where the current web project is located to the /app folder inside the container
# (this way the changes inside and outside the docker container will be synchronized
# without the necessity to re-build the container): ----
- ./:/app:rw
env_file:
- .env
ports:
- 8000:8000
networks:
- pankb-net
nginx_dev:
profiles:
- dev
container_name: pankb-nginx-dev
build:
context: ./nginx
args:
- PANKB_SERVER_TYPE=dev
image: pankb_nginx_dev:latest
restart: always # for the container to be up and running again even after the VM is brought down
volumes:
- ./static:/static # a folder, where the static content will be served from
ports:
- 80:80
networks:
- pankb-net
nginx_prod:
profiles:
- prod
container_name: pankb-nginx-prod
build: ./nginx
image: pankb_nginx_prod:latest
restart: always # for the container to be up and running again even after the VM is brought down
volumes:
- ./static:/static # a folder, where the static content will be served from
- ./certbot/www/:/var/www/certbot/:ro # a mounted folder that links nginx with certbot
- ./certbot/conf/live/pankb.org/fullchain.pem:/etc/nginx/ssl/live/pankb.org/fullchain.pem # the SSL certificate
- ./certbot/conf/live/pankb.org/privkey.pem:/etc/nginx/ssl/live/pankb.org/privkey.pem # the SSL private key
ports:
- 80:80
- 443:443
networks:
- pankb-net
certbot:
profiles:
- prod
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw