-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yaml
71 lines (64 loc) · 1.96 KB
/
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
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
version: "3.8"
services:
traefik:
image: traefik
restart: always
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--global.sendAnonymousUsage=false"
- "--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.tls.acme.httpchallenge=true"
- "--certificatesresolvers.tls.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.tls.acme.email=${ACME_EMAIL}"
- "--certificatesresolvers.tls.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "traefik:/letsencrypt"
postgres:
extends:
file: ./store/db.yaml
service: postgres
restart: always
environment:
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
app:
build:
context: ./app
dockerfile: Dockerfile.app
restart: always
privileged: true
environment:
- "POSTGRES_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/ctrl-x"
- "SCANNERD_URL=http://scannerd:8000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.request.rule=Host(`${APP_DOMAIN}`)"
- "traefik.http.routers.request.tls=true"
- "traefik.http.routers.request.tls.certresolver=tls"
- "traefik.http.services.request.loadbalancer.server.port=5000"
depends_on:
- postgres
scannerd:
build:
context: ./app
dockerfile: Dockerfile.scannerd
restart: always
privileged: true
environment:
- "POSTGRES_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/ctrl-x"
expose:
- "8000"
depends_on:
- postgres
volumes:
traefik:
ctrl_x: