This repository has been archived by the owner on Mar 4, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
103 lines (95 loc) · 2.83 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: '3.8'
services:
traefik:
image: traefik:latest
restart: always
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=bpavlisinec@gmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
networks:
- web
- internal
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- "./letsencrypt:/letsencrypt"
- /var/run/docker.sock:/var/run/docker.sock
nginx:
build: ./nginx
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.website.tls=true"
- "traefik.http.routers.website.rule=Host(`bolls.life`)"
- "traefik.http.routers.website.tls.certresolver=myresolver"
- "traefik.webservice.frontend.entryPoints=http,https"
volumes:
- static_volume:/home/bolls/web/static
networks:
- web
- internal
depends_on:
- web
web:
build:
context: ./django/
dockerfile: Dockerfile
restart: always
command: gunicorn bain.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/home/bolls/web/static
- ./:/quikpad
expose:
- 8000
ports:
- 5432:5432
environment:
- DEBUG=DEBUG_SECRET
- SECRET_KEY=SECRET_KEY_SECRET
- DJANGO_ALLOWED_HOSTS=DJANGO_ALLOWED_HOSTS_SECRET
- SQL_ENGINE=SQL_ENGINE_SECRET
- SQL_DATABASE=POSTGRES_DB_SECRET
- SQL_USER=POSTGRES_USER_SECRET
- SQL_PASSWORD=POSTGRES_PASSWORD_SECRET
- SQL_HOST=SQL_HOST_SECRET
- SQL_PORT=SQL_PORT_SECRET
- DATABASE=DATABASE_SECRET
- EMAIL_HOST_PASSWORD=EMAIL_HOST_PASSWORD_SECRET
- EMAIL_HOST_USER=EMAIL_HOST_USER_SECRET
- SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=SOCIAL_AUTH_GOOGLE_OAUTH2_KEY_SECRET
- SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET=SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET_SECRET
- SOCIAL_AUTH_GITHUB_KEY=SOCIAL_AUTH_GITHUB_KEY_SECRET
- SOCIAL_AUTH_GITHUB_SECRET=SOCIAL_AUTH_GITHUB_SECRET_SECRET
networks:
- web
- internal
db:
image: postgres:alpine
restart: always
container_name: postgres
environment:
- POSTGRES_USER=POSTGRES_USER_SECRET
- POSTGRES_PASSWORD=POSTGRES_PASSWORD_SECRET
- POSTGRES_DB=POSTGRES_DB_SECRET
- PGDATA=/var/lib/postgresql/data/bolls
labels:
- "traefik.enable=false"
networks:
- internal
volumes:
static_volume:
networks:
internal:
external: false
web:
external: true