-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
88 lines (84 loc) · 2.93 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
services:
syncstorage:
image: ${REPOSITORY}:${SYNCSTORAGE_IMAGE}-${SYNCSTORAGE_IMAGE_TAG}
environment:
SYNC_HOST: 0.0.0.0
SYNC_HUMAN_LOGS: 1
SYNC_MASTER_SECRET: ${SYNC_MASTER_SECRET}
SYNC_SYNCSTORAGE__DATABASE_URL: mysql://${MARIADB_SYNCSTORAGE_USER}:${MARIADB_SYNCSTORAGE_PASSWORD}@syncstorage_db:3306/syncstorage
SYNC_TOKENSERVER__ENABLED: "true"
SYNC_TOKENSERVER__RUN_MIGRATIONS: "true"
SYNC_TOKENSERVER__NODE_TYPE: mysql
SYNC_TOKENSERVER__DATABASE_URL: mysql://${MARIADB_TOKENSERVER_USER}:${MARIADB_TOKENSERVER_PASSWORD}@tokenserver_db:3306/tokenserver
SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN: api.accounts.firefox.com
SYNC_TOKENSERVER__FXA_OAUTH_SERVER_URL: https://oauth.accounts.firefox.com/v1
SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET: ${METRICS_HASH_SECRET}
SYNC_TOKENSERVER__ADDITIONAL_BLOCKING_THREADS_FOR_FXA_REQUESTS: 2
RUST_LOG: info
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/__heartbeat__"]
interval: 30s
timeout: 10s
retries: 5
restart: unless-stopped
depends_on:
syncstorage_db:
condition: service_healthy
tokenserver_db:
condition: service_healthy
ports:
- ${CONTAINER_EXPORT_PORT}:8000
syncstorage_db:
image: mariadb:lts
environment:
MARIADB_RANDOM_ROOT_PASSWORD: "true"
MARIADB_DATABASE: syncstorage
MARIADB_USER: ${MARIADB_SYNCSTORAGE_USER}
MARIADB_PASSWORD: ${MARIADB_SYNCSTORAGE_PASSWORD}
MARIADB_AUTO_UPGRADE: "true"
command: [mariadbd, --explicit_defaults_for_timestamp]
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
- syncstorage-db:/var/lib/mysql
restart: unless-stopped
tokenserver_db:
image: mariadb:lts
environment:
MARIADB_RANDOM_ROOT_PASSWORD: "true"
MARIADB_DATABASE: tokenserver
MARIADB_USER: ${MARIADB_TOKENSERVER_USER}
MARIADB_PASSWORD: ${MARIADB_TOKENSERVER_PASSWORD}
MARIADB_AUTO_UPGRADE: "true"
command: [mariadbd, --explicit_defaults_for_timestamp]
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
- tokenserver-db:/var/lib/mysql
restart: unless-stopped
tokenserver_db_init:
image: ${REPOSITORY}:${SYNCSTORAGE_INIT_IMAGE}-${SYNCSTORAGE_INIT_IMAGE_TAG}
depends_on:
tokenserver_db:
condition: service_healthy
syncstorage:
condition: service_healthy
restart: "no"
environment:
MARIADB_DATABASE: tokenserver
MARIADB_USER: ${MARIADB_TOKENSERVER_USER}
MARIADB_PASSWORD: ${MARIADB_TOKENSERVER_PASSWORD}
MAX_USERS: ${MAX_USERS}
DOMAIN: ${SYNCSTORAGE_DOMAIN}
entrypoint: /db_init.sh
volumes:
syncstorage-db:
tokenserver-db: