-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
45 lines (40 loc) · 1.04 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
---
version: '3'
x-condition-healthy: &healthy
condition: service_healthy
x-healthcheck-defaults: &healthcheck-defaults
interval: 5s
timeout: 10s
start_period: 10s
retries: 5
services:
web:
build:
context: .
target: development
ports:
- "4567:4567"
volumes:
- .:/usr/src/app
- gem_cache:/gems
command: bundle exec rackup --host 0.0.0.0 -p 4567
environment:
RIGHTS_API_DATABASE_CONNECTION_STRING: "mysql2://ht_rights:ht_rights@mariadb/ht"
RIGHTS_API_LOGGER_LEVEL: 1 # Logger::INFO
depends_on:
mariadb: *healthy
mariadb:
image: ghcr.io/hathitrust/db-image
volumes:
- ./sql/100_rights_log.sql:/docker-entrypoint-initdb.d/100_rights_log.sql
restart: always
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
MYSQL_DATABASE: ht
MYSQL_USER: ht_rights
MYSQL_PASSWORD: ht_rights
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
volumes:
gem_cache: