-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (134 loc) · 3.64 KB
/
docker-compose.yml
File metadata and controls
141 lines (134 loc) · 3.64 KB
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
services:
rails: &rails
build:
context: ./docker/rails
image: ghcr.io/hitobito/development/rails
restart: unless-stopped
user: "${RAILS_UID:-1000}"
tty: true
stdin_open: true
depends_on:
postgres:
condition: service_healthy
mailcatcher:
condition: service_healthy
cache:
condition: service_started
webpack:
condition: service_started
env_file: docker/rails/env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
DISABLE_SPRING: 'true'
#SKIP_SEEDS: 1
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- seed:/seed
- /tmp/.X11-unix:/tmp/.X11-unix
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./docker/rails/home/.bashrc:/home/developer/.bashrc
- ./docker/rails/home/.pryrc:/home/developer/.pryrc
- ./docker/rails/Gemfile.lock:/usr/src/app/hitobito/Gemfile.lock
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:3000/healthz"]
interval: 500s
timeout: 5s
start_period: 30m
rails_test:
<<: *rails
profiles:
- manual
command: [ 'sleep', 'infinity' ]
ports: []
environment:
RAILS_ENV: test
WEBPACKER_DEV_SERVER_HOST: null
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
postgres:
condition: service_healthy
worker:
<<: *rails
command: [ 'rails', 'jobs:work' ]
ports: []
environment:
SKIP_RAILS_MIGRATIONS: 1
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
rails:
condition: service_healthy
postgres:
condition: service_healthy
mailcatcher:
condition: service_healthy
cache:
condition: service_started
healthcheck:
disable: true
# Dependencies
mailcatcher:
image: ghcr.io/hitobito/development/mailcatcher
restart: unless-stopped
build:
context: ./docker/mailcatcher
ports:
- "127.0.0.1:1025:1025"
- "127.0.0.1:1080:1080"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:1080"]
interval: 5s
timeout: 5s
cache:
image: memcached:1.6-alpine
command: [ memcached, -l, '0.0.0.0', -p, '11211' ]
restart: unless-stopped
postgres:
image: postgres:17
restart: unless-stopped
env_file: ./docker/postgres.env
ports:
- "127.0.0.1:5432:5432"
volumes:
- ./docker/postgresql-setup.sql:/docker-entrypoint-initdb.d/postgresql-setup.sql:ro
- ./docker/test-setup-postgresql.sql:/docker-entrypoint-initdb.d/test-setup-postgresql.sql:ro
- postgres:/var/lib/postgresql/data
healthcheck:
# Password is autodetected from env vars…
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
webpack:
build:
context: ./docker/rails
image: ghcr.io/hitobito/development/rails
entrypoint: [ "webpack-entrypoint.sh" ]
restart: unless-stopped
env_file: docker/rails/env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
SKIP_BUNDLE_INSTALL: 1
user: "${RAILS_UID:-1000}"
command: /usr/src/app/hitobito/bin/webpack-dev-server
ports:
- "127.0.0.1:3035:3035"
volumes:
- ./app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- hitobito_yarn_cache:/home/developer/.cache/yarn
- ./docker/rails/Gemfile.lock:/usr/src/app/hitobito/Gemfile.lock
depends_on:
postgres:
condition: service_healthy
volumes:
postgres:
seed:
hitobito_bundle:
external: true
hitobito_yarn_cache:
external: true