forked from BridgeCityBicycleCoop/workstand
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.demo.yml
88 lines (80 loc) · 2.17 KB
/
docker-compose.demo.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# The environment is setup to use jwilder/nginx-proxy and
# JrCs/docker-letsencrypt-nginx-proxy-companion but can easily be
# modified to be served by an alternative http server.
# docker-compose -f docker-compose.demo.yml build
# docker-compose -f docker-compose.demo.yml up -d
# bikeshop/settings/production.py will need ALLOWED_HOSTS altered correctly
version: "2"
services:
nginx:
container_name: workstand-nginx
image: workstand-nginx
build:
context: .
dockerfile: Dockerfile-nginx
volumes:
- static:/usr/share/nginx/html/static
links:
- workstand
network_mode: "bridge"
environment:
- VIRTUAL_HOST=workstand.bikelover.org
- LETSENCRYPT_HOST=workstand.bikelover.org
- LETSENCRYPT_EMAIL=bike@bikelover.org
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
workstand:
container_name: workstand
build:
context: .
dockerfile: Dockerfile
command: 'bash -c "PYTHONUNBUFFERED=TRUE python manage.py migrate --no-input && python manage.py collectstatic --no-input && python manage.py rebuild_index --noinput && python manage.py loaddata fixtures.yaml && gunicorn --log-file=- -b 0.0.0.0:8000 bikeshop.wsgi:application"'
network_mode: "bridge"
image: bcbc/workstand:production
links:
- redis
- db
environment:
- DJANGO_SETTINGS_MODULE=bikeshop.settings.production
- PORT=8000
volumes:
- static:/code/static
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
container_name: workstand-redis
network_mode: "bridge"
image: redis:latest
volumes:
- redis:/data
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
db:
container_name: workstand-db
network_mode: "bridge"
image: postgres:latest
volumes:
- pgdata:/var/lib/postgresql/data/
restart: always
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
pgdata:
external: false
redis:
static: