-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.docker-compose.yaml
39 lines (37 loc) · 1.31 KB
/
api.docker-compose.yaml
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
version: '3.8'
services:
reverse-proxy:
image: traefik:v2.3
command:
- --providers.docker
- --providers.file.directory=/etc/traefik/dynamic
- --entryPoints.http.address=:80
- --entryPoints.https.address=:443
labels:
#Redirect HTTP -> HTTPS
- "traefik.enable=true"
- "traefik.http.routers.https-redirect.entrypoints=http"
- "traefik.http.routers.https-redirect.rule=HostRegexp(`{any:.*}`)"
- "traefik.http.routers.https-redirect.middlewares=https-redirect"
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/letsencrypt/live/embedd.ml/cert.pem:/secrets/cert.pem
- /etc/letsencrypt/live/embedd.ml/privkey.pem:/secrets/key.pem
- ./certs-traefik.yaml:/etc/traefik/dynamic/certs-traefik.yaml
api:
image: piotrgramacki/sma-api
labels:
- "traefik.http.routers.api.entrypoints=https"
- "traefik.http.routers.api.tls=true"
- "traefik.http.routers.api.rule=Host(`api-politicians.embedd.ml`)"
- "traefik.http.services.api-service.loadbalancer.server.port=80"
env_file:
- env_files/twitter_credentials.env
environment:
- MAX_WORKERS=2
volumes:
- ./data/:/app/data/