-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (89 loc) · 2.27 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
version: "3.7"
# Dockerfileで定義したアプリケーションコンテナの構築で必要な情報を提供する
x-app: &app
build:
context: .
dockerfile: ./.dockerdev/runner/Dockerfile
args:
RUBY_VERSION: '2.7.5'
PG_MAJOR: '11'
NODE_MAJOR: '14'
YARN_VERSION: '1.21.1'
BUNDLER_VERSION: '2.1.4'
environment: &env
RAILS_ENV: ${RAILS_ENV:-development}
NODE_ENV: ${NODE_ENV:-development}
tmpfs:
- /tmp
# Rubyのサービスで共有するボリュームを提供する
x-backend-volumes: &backend-volumes
volumes:
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- .dockerdev/.bashrc:/root/.bashrc:ro
- .:/app:cached
- bundle:/bundle
# Rubyのサービスで共有する振る舞いを提供する
x-backend: &backend
<<: *app
stdin_open: true
tty: true
environment:
<<: *env
BOOTSNAP_CACHE_DIR: /bundle/bootsnap
HISTFILE: /app/log/.bash_history
PSQL_HISTFILE: /app/log/.psql_history
EDITOR: vi
MALLOC_ARENA_MAX: 2
WEB_CONCURRENCY: ${WEB_CONCURRENCY:-1}
depends_on:
- postgres
services:
runner:
<<: *backend
<<: *backend-volumes
command: >
bash -c "bundle install &&
bin/rake db:create &&
bin/rake db:migrate &&
bash"
ports:
- '3002:3002'
postgres:
image: postgres:11.5
volumes:
- .dockerdev/init_postgres/:/docker-entrypoint-initdb.d/
- .dockerdev/.psqlrc:/root/.psqlrc:ro
- postgres:/var/lib/postgresql/data
- ./log:/root/log:cached
environment:
PSQL_HISTFILE: /root/log/.psql_history
ports:
- '5432:5432'
schemaspy:
build:
context: .
dockerfile: ./.dockerdev/schemaspy/Dockerfile
args:
SCHEMASPY_VERSION: 6.1.0
MYSQL_VERSION: 6.0.6
MARIADB_VERSION: 1.1.10
POSTGRESQL_VERSION: 42.1.1
JTDS_VERSION: 1.3.1
volumes:
- .dockerdev/schemaspy/output/:/output
- .dockerdev/schemaspy/schemaspy.properties:/schemaspy.properties
command: >
schemaspy
depends_on:
- postgres
schemaspy_web:
image: nginx:1.21.6-alpine
volumes:
- .dockerdev/schemaspy/output/:/usr/share/nginx/html
ports:
- ${SCHEMASPY_WEB_PORT:-8080}:80
depends_on:
- schemaspy
volumes:
postgres:
bundle: