forked from govcms-tests/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.services.yml
157 lines (150 loc) · 4.33 KB
/
docker-compose.services.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
services:
registry:
image: registry:2
container_name: registry
ports:
- "5001:5000"
volumes:
- ./data/registry:/var/lib/registry
- ./data/registry/config.yml:/etc/docker/registry/config.yml
##########################################
# traefik: The reverse proxy and load balancer
##########################################
traefik:
image: traefik:latest
container_name: traefik
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entryPoints.web.address=:80"
# - "--entryPoints.websecure.address=:443"
# - "--entryPoints.websecure.http.tls=true"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- ./.docker/config/traefik.yaml:/etc/traefik/traefik.yaml
- "./data/certs:/certs"
networks:
- web
- internal
healthcheck:
test: [ "CMD", "traefik", "healthcheck" ]
interval: 30s
timeout: 10s
retries: 3
##########################################
# mailhog: The mail capture service
##########################################
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog
labels:
- "traefik.http.routers.mailhog.rule=Host(`mailhog.govcms.localhost`)"
- "traefik.http.routers.mailhog-http.entrypoints=web"
- "traefik.http.services.mailhog.loadbalancer.server.port=8025"
# HTTPS Router
# - "traefik.http.routers.mailhog-https.rule=Host(`mailhog.govcms.localhost`)"
# - "traefik.http.routers.mailhog-https.entrypoints=websecure"
# - "traefik.http.routers.mailhog-https.tls=true"
# - "traefik.http.routers.mailhog-https.tls.certresolver=myresolver"
networks:
- web
- internal
##########################################
# mariadb: The database used by local
##########################################
mariadb:
image: mariadb:latest
container_name: mariadb
environment:
MARIADB_ROOT_PASSWORD: ${MARIADB_ROOT_PASSWORD:-root}
MARIADB_DATABASE: ${MARIADB_DATABASE:-drupal}
MARIADB_USER: ${MARIADB_USER:-drupal}
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-drupal}
volumes:
- mariadb_data:/var/lib/mysql
networks:
- internal
healthcheck:
test: [ "CMD-SHELL", "mysqladmin ping -h localhost" ]
interval: 30s
timeout: 10s
retries: 5
##########################################
# packeton: The private composer repository
##########################################
packeton:
build:
context: .docker
dockerfile: Dockerfile.packeton
container_name: packeton
environment:
APP_SECRET: 'govcms'
DATABASE_URL: 'sqlite:////data/app.db'
REDIS_URL: 'redis://redis'
PUBLIC_ACCESS: 'true'
volumes:
- ./.docker/config/mirrors.yaml:/var/www/packagist/config/packages/mirrors.yaml
- packeton_data:/data
labels:
- "traefik.enable=true"
# HTTP Router
- "traefik.http.routers.packeton-http.rule=Host(`packeton.govcms.localhost`)"
- "traefik.http.routers.packeton-http.entrypoints=web"
# HTTPS Router
# - "traefik.http.routers.packeton-https.rule=Host(`packeton.govcms.localhost`)"
# - "traefik.http.routers.packeton-https.entrypoints=websecure"
# - "traefik.http.routers.packeton-https.tls=true"
# - "traefik.http.routers.packeton-https.tls.certresolver=myresolver"
networks:
- web
- internal
depends_on:
- redis
- traefik
##########################################
# redis: Redis server for Packeton
##########################################
redis:
image: redis:latest
container_name: redis
volumes:
- redis_data:/data
networks:
- internal
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 3
volumes:
registry:
driver: local
driver_opts:
type: none
o: bind
device: ./data/registry
mariadb_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data/mariadb_data
packeton_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data/packeton
redis_data:
driver: local
driver_opts:
type: none
o: bind
device: ./data/redis_data
networks:
web:
internal: