-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.production.yml
56 lines (52 loc) · 1.45 KB
/
docker-compose.production.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
version: '3.8'
services:
traefik:
image: traefik:v2.2
container_name: cinemaempoa_traefik
command:
- "--providers.docker"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.websecure.address=:443"
- "--certificatesResolvers.lets-encrypt.acme.email=${ACME_EMAIL:?Please set the ACME_EMAIL env variable}"
- "--certificatesResolvers.lets-encrypt.acme.tlsChallenge=true"
- "--certificatesResolvers.lets-encrypt.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- letsencrypt:/letsencrypt
networks:
- web
flask:
container_name: cinemaempoa_flask
build:
context: .
dockerfile: Dockerfile.prod
volumes:
- .:/app
networks:
- web
expose:
- 8080
nginx:
image: nginx:stable-alpine
container_name: cinemaempoa_nginx
volumes:
- .:/app
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- flask
labels:
- "traefik.http.routers.nginx.entrypoints=websecure"
- "traefik.http.routers.nginx.rule=Host(`cinemaempoa.com.br`)"
- "traefik.http.routers.nginx.tls.certresolver=lets-encrypt"
networks:
- web
volumes:
letsencrypt:
networks:
web:
external: false