-
Notifications
You must be signed in to change notification settings - Fork 53
/
docker-compose.yml
125 lines (114 loc) · 3.07 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
118
119
120
121
122
123
124
125
---
# version: https://github.com/compose-spec/compose-spec/blob/master/spec.md
services:
twfy:
image: theyworkforyou
platform: linux/amd64
build:
context: .
depends_on:
mariatestdb:
condition: service_started
memcache:
condition: service_started
redis:
condition: service_healthy
sentinel:
condition: service_healthy
command: /twfy/bin/docker-entrypoint.sh
environment:
TWFY_TEST_DB_HOST: mariatestdb
TWFY_TEST_DB_NAME: twfy
TWFY_TEST_DB_USER: twfy
TWFY_TEST_DB_PASS: password
TWFY_VOTES_URL: ${TWFY_VOTES_URL}
MAPIT_URL: ${MAPIT_URL:-https://mapit.mysociety.org/}
MAPIT_API_KEY: ${MAPIT_API_KEY:-}
DEMOCRACYCLUB_TOKEN: ${DEMOCRACYCLUB_TOKEN:-}
RECAPTCHA_SITE_KEY: ${RECAPTCHA_SITE_KEY:-}
RECAPTCHA_SECRET: ${RECAPTCHA_SECRET:-}
STRIPE_DONATE_PUBLIC_KEY: ${STRIPE_DONATE_PUBLIC_KEY:-}
STRIPE_DONATE_SECRET_KEY: ${STRIPE_DONATE_SECRET_KEY:-}
DEV_MODE: 'true'
WSL_IP:
ports:
- "8000:80"
volumes:
- ./:/twfy
- vendor:/twfy/vendor
- xapian:/twfy/searchdb
- ./xdebug-local.ini:/etc/php/7.3/cli/conf.d/xdebug-local.ini
extra_hosts:
- "host.docker.internal:host-gateway"
mariadb:
image: mariadb:10.5
command: '--sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
environment:
MARIADB_RANDOM_ROOT_PASSWORD: '1'
MARIADB_USER: twfy
MARIADB_PASSWORD: password
MARIADB_DATABASE: twfy
healthcheck:
test: ["CMD", "mysqladmin", "-utwfy", "-ppassword", "ping"]
interval: 1s
timeout: 5s
retries: 5
volumes:
- ./db/schema.sql:/docker-entrypoint-initdb.d/schema.sql
- db:/var/lib/mysql
mariatestdb:
image: mariadb:10.5
depends_on:
mariadb:
condition: service_healthy
command: '--sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"'
environment:
MARIADB_RANDOM_ROOT_PASSWORD: '1'
MARIADB_USER: twfy
MARIADB_PASSWORD: password
MARIADB_DATABASE: twfy
volumes:
- ./db/schema.sql:/docker-entrypoint-initdb.d/schema.sql
- testdb:/var/lib/mysql
memcache:
image: memcached:1.6-alpine
redis:
image: bitnami/redis
ports:
- 6379:6379
environment:
REDIS_PASSWORD: password
healthcheck:
test: ["CMD-SHELL", "redis-cli -a password ping | grep PONG"]
interval: 1s
timeout: 5s
retries: 5
sentinel:
image: bitnami/redis-sentinel
environment:
REDIS_MASTER_HOST: redis
REDIS_MASTER_SET: mymaster
REDIS_MASTER_PASSWORD: password
REDIS_SENTINEL_QUORUM: 1
ports:
- 26379:26379
healthcheck:
test: ["CMD-SHELL", "redis-cli -p 26379 ping | grep PONG"]
interval: 1s
timeout: 5s
retries: 5
mailhog:
image: mailhog/mailhog:v1.0.1
restart: always
ports:
- 1025:1025
- 8025:8025
networks:
default:
aliases:
- email.svc
volumes:
db:
testdb:
xapian:
vendor: