-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
62 lines (59 loc) · 1.69 KB
/
docker-compose.prod.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
# Docker Compose creates multiple containers on a single machine.
# run `docker-compose -f docker-compose.prod.yml up --build` to create and run/link the containers
# This file can be deleted once the old selection site is migrated officially.
# The docker volumes should also be deleted and pointed back to the originals.
# Must set the following environment variables
# POSTGRES_USER
# POSTGRES_PASSWORD
# BUILDINGSYNC_WEBSITE_ADMIN_USER
# BUILDINGSYNC_WEBSITE_ADMIN_EMAIL
# BUILDINGSYNC_WEBSITE_ADMIN_PASSWORD
# SECRET_KEY
version: "3"
services:
db-postgres:
image: postgres:11.1
environment:
- POSTGRES_DB=buildingsync-website
- POSTGRES_USER
- POSTGRES_PASSWORD
volumes:
- buildingsync_pgdata:/var/lib/postgresql/data
- $HOME/buildingsync-website-backups:/backups
restart: unless-stopped
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
web:
build: .
environment:
- POSTGRES_DB=buildingsync-website
- POSTGRES_USER
- POSTGRES_PASSWORD
- SECRET_KEY
- DJANGO_SETTINGS_MODULE=bsyncviewer.settings.docker
- DJANGO_DEBUG=False
- BUILDINGSYNC_WEBSITE_ADMIN_USER
- BUILDINGSYNC_WEBSITE_ADMIN_EMAIL
- BUILDINGSYNC_WEBSITE_ADMIN_PASSWORD
depends_on:
- db-postgres
ports:
- "8082:80"
volumes:
- buildingsync_media:/srv/buildingsync-website/bsyncviewer/media
restart: unless-stopped
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
volumes:
buildingsync_pgdata:
external: true
buildingsync_media:
external: true