-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocker-compose.livewire.yml
88 lines (82 loc) · 1.97 KB
/
docker-compose.livewire.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
# Live environment with all services cenralized to one machine
version: '3.3'
services:
api:
build:
args:
- PYTHON_ENV=prod
ports:
- ${API_PORT}
environment:
SECRET_KEY: ${SECRET_KEY}
DATABASE_URL: postgis://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/woaq
DEFAULT_FILE_STORAGE: django.core.files.storage.FileSystemStorage
LETSENCRYPT_HOST: ${API_DOMAIN}
VIRTUAL_HOST: ${API_DOMAIN}
VIRTUAL_PORT: ${API_PORT}
volumes:
- ./api:/usr/src/app
- logs:/usr/src/app/logs
- static:/usr/src/app/public/static
depends_on:
- db
restart: always
stdin_open: true
tty: true
web:
build:
dockerfile: Dockerfile.prod
ports:
- ${WEB_PORT}
- 3000:80
environment:
LETSENCRYPT_HOST: ${WEB_DOMAIN}
VIRTUAL_HOST: ${WEB_DOMAIN}
VIRTUAL_PORT: ${WEB_PORT}
API_DOMAIN: ${API_DOMAIN}
db:
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: woaq
volumes:
- postgres:/var/lib/postgresql/data
ports:
- 5432
restart: always
proxy:
build:
args:
- API_DOMAIN=${API_DOMAIN}
ports:
- 80:80
- 443:443
volumes:
- 'html:/usr/share/nginx/html'
- "dhparam:/etc/nginx/dhparam"
- 'vhost:/etc/nginx/vhost.d'
- 'certs:/etc/nginx/certs'
- '/var/run/docker.sock:/tmp/docker.sock:ro'
- static:/var/www/html/static/
ssl:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- 'html:/usr/share/nginx/html'
- "dhparam:/etc/nginx/dhparam"
- 'vhost:/etc/nginx/vhost.d'
- 'certs:/etc/nginx/certs'
- "/run/docker.sock:/var/run/docker.sock:ro"
environment:
NGINX_PROXY_CONTAINER: "woaq-proxy"
DEFAULT_EMAIL: ${DEFAULT_EMAIL}
restart: always
depends_on:
- "proxy"
volumes:
logs:
postgres:
static:
certs:
html:
vhost:
dhparam: