This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocker-compose.yml
117 lines (106 loc) · 3.61 KB
/
docker-compose.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
version: "3.4"
# ____ _____ ______ _____ ____ _____ ____
# / ___|| ____| _ \ \ / /_ _/ ___| ____/ ___|
# \___ \| _| | |_) \ \ / / | | | | _| \___ \
# ___) | |___| _ < \ V / | | |___| |___ ___) |
# |____/|_____|_| \_\ \_/ |___\____|_____|____/
#
services:
# __ _____ __
# / /__________ ____ / __(_) /__
# / __/ ___/ __ `/ _ \/ /_/ / //_/ __
# / /_/ / / /_/ / __/ __/ / ,< _| =\__
# \__/_/ \__,_/\___/_/ /_/_/|_| /o____o_\
traefik:
# The official v2.4.5 Traefik docker image
image: traefik:v2.4.5
networks:
- traefik-network
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--providers.docker"
# Do not expose containers unless explicitly told so
- "--providers.docker.exposedbydefault=false"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
# _ _ _ _ _
# __ _(_) |_| |__ _ _| |__ _ __ ___ ___ ___| |_ ___
# / _` | | __| '_ \| | | | '_ \ | '_ ` _ \ / _ \/ _ \ __/ __|
# | (_| | | |_| | | | |_| | |_) | | | | | | | __/ __/ |_\__ \
# \__, |_|\__|_| |_|\__,_|_.__/ |_| |_| |_|\___|\___|\__|___/
# |___/
#
# ___ _ __ __ _ _ __
# / __| '_ \ / _` | '_ \
# | (__| |_) | (_| | | | |
# \___| .__/ \__,_|_| |_|
# |_|
#
github-meets-cpan:
image: metacpan/github-meets-cpan:latest
command: "/wait-for-it.sh mongodb:27017 -- carton exec morbo script/app.pl"
depends_on:
- mongodb
- traefik
networks:
- mongo
- traefik-network
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik-network"
- "traefik.http.routers.github-meets-cpan.rule=Host(`gh.metacpan.localhost`)"
- "traefik.http.services.gh-meet-cpan-web.loadbalancer.server.port=3000"
# _ _ _ _ _
# __ _(_) |_| |__ _ _| |__ _ __ ___ ___ ___| |_ ___
# / _` | | __| '_ \| | | | '_ \ | '_ ` _ \ / _ \/ _ \ __/ __|
# | (_| | | |_| | | | |_| | |_) | | | | | | | __/ __/ |_\__ \
# \__, |_|\__|_| |_|\__,_|_.__/ |_| |_| |_|\___|\___|\__|___/
# |___/
#
# ___ _ __ __ _ _ __ ___ _ __ ___ _ __
# / __| '_ \ / _` | '_ \ / __| '__/ _ \| '_ \
# | (__| |_) | (_| | | | | | (__| | | (_) | | | |
# \___| .__/ \__,_|_| |_| \___|_| \___/|_| |_|
# |_|
#
github-meets-cpan-cron:
image: metacpan/github-meets-cpan:latest
command: "/wait-for-it.sh mongodb:27017 -- carton exec perl cron/update.pl"
depends_on:
- mongodb
networks:
- mongo
# _ _
# _ __ ___ ___ _ __ __ _ ___ __| | |__
# | '_ ` _ \ / _ \| '_ \ / _` |/ _ \ / _` | '_ \
# | | | | | | (_) | | | | (_| | (_) | (_| | |_) |
# |_| |_| |_|\___/|_| |_|\__, |\___/ \__,_|_.__/
# |___/
#
mongodb:
image: mongo:4.4.9
networks:
- mongo
healthcheck:
interval: 10s
timeout: 10s
retries: 0
start_period: 40s
test: echo 'db.runCommand("ping").ok' | mongo mongodb:27017/test --quiet
# _ _ _____ _______ _____ ____ _ ______
# | \ | | ____|_ _\ \ / / _ \| _ \| |/ / ___|
# | \| | _| | | \ \ /\ / / | | | |_) | ' /\___ \
# | |\ | |___ | | \ V V /| |_| | _ <| . \ ___) |
# |_| \_|_____| |_| \_/\_/ \___/|_| \_\_|\_\____/
#
networks:
mongo:
traefik-network: