-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
96 lines (89 loc) · 2 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
version: '2.4'
x-app: &app
build:
context: .dockerdev
dockerfile: Dockerfile
args:
RUBY_VERSION: '2.7.0'
PG_MAJOR: '13'
BUNDLER_VERSION: '2.1.2'
environment: &env
RACK_ENV: ${RACK_ENV:-development}
image: airports_api_dev:1.1.0
tmpfs:
- /tmp
x-backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app
- bundle:/usr/local/bundle
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- .dockerdev/.bashrc:/root/.bashrc:ro
environment:
<<: *env
WEB_CONCURRENCY: 1
HISTFILE: /app/log/.bash_history
PSQL_HISTFILE: /app/log/.psql_history
EDITOR: vi
services:
runner:
<<: *backend
command: /bin/bash
ports:
- '9292:9393'
depends_on:
database:
condition: service_healthy
test_runner:
<<: *backend
command: /bin/bash
environment:
<<: *env
RACK_ENV: test
depends_on:
test_database:
condition: service_healthy
api:
<<: *backend
command: bundle exec shotgun --host 0.0.0.0 --port 3200
ports:
- 3200:3200
depends_on:
database:
condition: service_healthy
database:
image: postgres:13.0
volumes:
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- airports_api_db_vol:/var/lib/postgresql/data
- ./log:/root/log:cached
environment:
PSQL_HISTFILE: /root/log/.psql_history
POSTGRES_USER: etl_user
POSTGRES_PASSWORD: hu8jmn3
POSTGRES_DB: airports_api
ports:
- 6432:5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
test_database:
image: postgres:13.0
volumes:
- postgres_airports_api_test:/var/lib/postgresql/data
environment:
POSTGRES_USER: etl_user
POSTGRES_PASSWORD: hu8jmn3
POSTGRES_DB: airports_api_playground
ports:
- 7432:5432
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
volumes:
airports_api_db_vol:
external: true
postgres_airports_api_test:
bundle: