-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
106 lines (99 loc) · 2.58 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
98
99
100
101
102
103
104
105
106
services:
rails: &rails
build:
context: ./docker/rails
image: ghcr.io/hitobito/development/rails
user: "${RAILS_UID:-1000}"
tty: true
stdin_open: true
depends_on:
- postgres
- mailcatcher
- cache
- webpack
env_file: docker/rails/env
environment:
WEBPACKER_DEV_SERVER_HOST: webpack
DISABLE_SPRING: 'true'
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./app/:/usr/src/app
- hitobito_bundle:/opt/bundle
- seed:/seed
- ./docker/rails/home:/home/developer
- /tmp/.X11-unix:/tmp/.X11-unix
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./docker/rails/Gemfile.lock:/usr/src/app/hitobito/Gemfile.lock
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
worker:
<<: *rails
command: [ 'rails', 'jobs:work' ]
ports: []
environment:
SKIP_RAILS_MIGRATIONS: 1
SKIP_SEEDS: 1
SKIP_BUNDLE_INSTALL: 1
depends_on:
- rails
- postgres
- mailcatcher
- cache
# Dependencies
mailcatcher:
image: ghcr.io/hitobito/development/mailcatcher
build:
context: ./docker/mailcatcher
ports:
- "127.0.0.1:1025:1025"
- "127.0.0.1:1080:1080"
cache:
image: memcached:1.6-alpine
command: [ memcached, -l, '0.0.0.0', -p, '11211' ]
postgres:
image: postgres:16
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
webpack:
build:
context: ./docker/rails
image: ghcr.io/hitobito/development/rails
entrypoint: [ "webpack-entrypoint.sh" ]
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
volumes:
postgres:
seed:
hitobito_bundle:
external: true
hitobito_yarn_cache:
external: true