-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.prod.yml
100 lines (91 loc) · 2.85 KB
/
docker-compose.prod.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
version: '2.4'
networks:
backend:
driver: bridge
volumes:
shared-pkg:
build-cache:
services:
#############################################
# traefik - reverse proxy
#############################################
traefik-spire:
restart: always
image: "traefik:v2.10"
container_name: "traefik-spire"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.address=:80"
- "--certificatesresolvers.le.acme.tlschallenge=true"
- "--certificatesresolvers.le.acme.email=akkadius1+certbot@gmail.com"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
ports:
- "${IP_ADDRESS}:80:80"
- "${IP_ADDRESS}:443:443"
volumes:
- "./data/letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- backend
#############################################
# spire gets served out of workspace
#############################################
workspace:
restart: unless-stopped
image: prod
build:
context: ./containers/prod
hostname: prod
tty: true
volumes:
- ./:/home/go/src
- build-cache:/home/go/.cache/
- shared-pkg:/home/go/pkg
environment:
TZ: America/Chicago
CGO_ENABLED: 0
APP_ENV: production
IS_HOSTED_READ_ONLY_MODE: 1
TERM: xterm-256color
networks:
- backend
command: "air -c .air.prod.toml"
depends_on:
- traefik-spire
labels:
- "traefik.enable=true"
# http
- "traefik.http.routers.spire-http.rule=Host(`spire.akkadius.com`)"
- "traefik.http.routers.spire-http.entrypoints=web"
- "traefik.http.routers.spire-http.service=spire-http"
- "traefik.http.services.spire-http.loadbalancer.server.port=3010"
- "traefik.http.routers.spire-http.middlewares=spire-https"
- "traefik.http.middlewares.spire-https.redirectscheme.scheme=https"
# https
- "traefik.http.routers.spire-https.rule=Host(`spire.akkadius.com`)"
- "traefik.http.routers.spire-https.entrypoints=websecure"
- "traefik.http.routers.spire-https.tls.certresolver=le"
- "traefik.http.routers.spire-https.service=spire-https"
- "traefik.http.services.spire-https.loadbalancer.server.port=3010"
#############################################
# backup
#############################################
backup-cron:
restart: unless-stopped
image: akkadius/eqemu-backup-cron:latest
build:
context: ./containers/backup-cron
hostname: backup-cron
tty: true
volumes:
- ./:/home/backup-cron/
environment:
TZ: America/Chicago
# HOST_NAME: ${HOSTNAME:-default}
# HOST_DIR: ${PWD}
networks:
- backend