-
Notifications
You must be signed in to change notification settings - Fork 1
/
production_n.yml
132 lines (122 loc) · 4.01 KB
/
production_n.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: '3'
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_traefik: {}
services:
frontend:
container_name: frontend
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
image: biocrust_app_frontend
depends_on:
- django
volumes:
- ./frontend/nginx:/etc/nginx/conf.d
expose:
- 80
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=Host(`it245151.uni-graz.at`)"
# - "traefik.http.services.frontend.loadbalancer.server.port=80"
# - "traefik.http.routers.frontend.middlewares=traefik-https-redirect"
# - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
# - "traefik.http.routers.frontend-secure.entrypoints=websecure"
# - "traefik.http.routers.frontend-secure.rule=Host(`cc-explorer.com`)"
# - "traefik.http.routers.frontend-secure.service=frontend"
# - "traefik.http.routers.frontend-secure.tls=true"
# - "traefik.http.routers.frontend-secure.tls.certresolver=cloudflare"
ml-api:
build:
context: .
dockerfile: ./compose/local/ml-api/Dockerfile
environment:
- ML_ENV=staging
image: biocrust_app_local_ml-api
container_name: biocrust_app_local_ml-api
depends_on:
- django
ports:
- "8082:8082"
django:
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: biocrust_app_local_django
container_name: biocrust_app_local_django
depends_on:
- postgres
volumes:
- .:/app:z
env_file:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports:
- '8000:8000'
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: biocrust_app_production_postgres
container_name: biocrust_app_local_postgres
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
ports:
- '5432:5432'
env_file:
- ./.envs/.local/.postgres
traefik:
build:
context: .
dockerfile: ./compose/production/traefik/Dockerfile
image: biocrust_app_production_traefik
container_name: biocrust_app_production_traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- proxy
depends_on:
- django
volumes:
- ./compose/production/traefik:/etc/traefik/acme
- ./compose/production/traefik
- ./compose/production/traefik/traefik.yml:/etc/traefik/traefik.yml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/traefik/certs:/etc/traefik/certs:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`it245151.uni-graz.at`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=USER:BASIC_AUTH_PASSWORD"
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`it245151.uni-graz.at`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certFile=/etc/traefik/certs/fullchain.pem"
- "traefik.http.routers.traefik-secure.tls.keyFile=/etc/traefik/certs/privkey.pem"
ports:
- '80:80'
- '443:443'
env_file:
- ./.envs/.production/.traefik
# redis:
# image: redis:6
# awscli:
# build:
# context: .
# dockerfile: ./compose/production/aws/Dockerfile
# env_file:
# - ./.envs/.production/.django
# volumes:
# - production_postgres_data_backups:/backups:z
networks:
proxy:
external: true