-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yml
45 lines (42 loc) · 1.12 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
version: '2'
services:
db:
image: postgres
container_name: escrutinio-social-db
expose:
- "5432"
app:
container_name: escrutinio-social-app
build: .
volumes:
- ./:/projec/proj
- static-volume:/project/proj/static/
command: /project/proj/docker/app-start.sh
environment:
- DATABASE_URL=postgres://postgres@db/postgres
- SITE_DIR=/project
- PROJECT_NAME=escrutinio_social
- GOOGLE_ANALYTICS_PROPERTY_ID=UA-345678-2
- DJANGO_SECRET_KEY=unaclavesupersecreta
expose:
- "8000"
depends_on:
- db
web:
image: nginx:1.13
container_name: escrutinio-social-web
ports:
- "80:80"
- "443:443"
depends_on:
- app
volumes:
- ./docker/nginx/default.template.conf:/root/default.template.conf
- ./docker/tls/:/site/tls/
- static-volume:/static
command: /bin/bash -c "envsubst '$$NGINX_HTTP_PORT $$NGINX_HTTPS_PORT' < /root/default.template.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
environment:
- NGINX_HTTP_PORT=80
- NGINX_HTTPS_PORT=443
volumes:
static-volume: