forked from apiening/fleet-docker
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-traefik-standalone.yml
67 lines (61 loc) · 1.71 KB
/
docker-compose-traefik-standalone.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
---
version: '3.7'
services:
mysql:
image: mysql
volumes:
- ./mysql/data:/var/lib/mysql
env_file: mysql/default.env
cap_add:
- SYS_NICE
redis:
image: redis
fleet:
image: fleetdm/fleet
depends_on:
- mysql
- redis
command: sh -c "/usr/bin/fleet prepare db --no-prompt && /usr/bin/fleet serve"
env_file: fleet/default.env
volumes:
- ./fleet:/fleet/
- ./fleet/logs:/logs
- ./fleet/vulndb:/vulndb
labels:
traefik.enable: true
traefik.http.routers.fleet.entrypoints: "websecure"
traefik.http.routers.fleet.rule: "Host(`fleet.example.com`)"
traefik.http.services.fleet.loadbalancer.server.port: "8412"
traefik.http.routers.fleet.tls: true
traefik.http.routers.fleet.tls.certresolver: "default"
networks:
- traefik_proxy
- default
traefik:
image: traefik:v2.7
container_name: traefik
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./config:/etc/traefik
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.traefik.rule=Host(`traefik.example.com`)"
# - "traefik.http.routers.traefik.entrypoints=websecure"
# - "traefik.http.routers.traefik.tls.certresolver=default"
# - "traefik.http.routers.traefik.service=api@internal"
# - "traefik.http.routers.traefik.middlewares=auth@docker"
# - "traefik.http.middlewares.auth.basicauth.users=user:pass"
networks:
- traefik_proxy
- default
ports:
- "80:80"
- "443:443"
restart: unless-stopped
networks:
traefik_proxy:
external: true
default:
driver: bridge