forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
138 lines (129 loc) · 3.11 KB
/
compose.yaml
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
services:
app: &app
build:
context: .
dockerfile: ./.dockerfiles/Dockerfile
target: dev
image: markus-dev:1.2.0
tmpfs:
- /tmp
stdin_open: true
tty: true
env_file:
- .dockerfiles/.env
environment:
- NODE_ENV=development
- RAILS_ENV=development
networks:
- default
- markus_dev
depends_on:
- postgres
- redis
rails: &rails
<<: *app
image: markus-dev-rails:1.2.0
entrypoint: .dockerfiles/entrypoint-dev-rails.sh
command: bundle exec rails server -b 0.0.0.0
environment:
- RAILS_RELATIVE_URL_ROOT=/csc108
- PGDATABASE=markus_development
- PGDATABASETEST=markus_test
- MARKUS_URL=http://host.docker.internal:3000 # used by the tasks in autotest.rake
- MARKUS__REPOSITORY__SSH_URL=ssh://markus@localhost:2222/~/csc108
- CAPYBARA_SERVER_PORT=${CAPYBARA_SERVER_PORT:-3434}
- CAPYBARA_SERVER_HOST=${CAPYBARA_SERVER_HOST:-0.0.0.0}
- PLAYWRIGHT_BROWSERS_PATH=/app/tmp/pw-browsers
extra_hosts:
- localhost:host-gateway
ports:
- '3000:3000'
volumes:
- app_data:/app/data/development
- repos:/app/data/development/repos
- bundle:/bundle
- tmp:/app/tmp
- node_modules:/app/node_modules
- log:/app/log
- python:/app/venv
- .:/app:cached
depends_on:
- postgres
- redis
- resque
- resque-scheduler
- webpack
- ssh
ssh:
<<: *rails
image: markus-dev-ssh:1.2.0
volumes:
- log:/home/markus/log
- repos:/home/markus/csc108
- .dockerfiles/:/app/.dockerfiles
- ./lib/repo:/app/lib/repo
environment:
- TZ=America/Toronto
command: /usr/sbin/sshd -D -e
user: root
extra_hosts: []
ports:
- '2222:22'
entrypoint: .dockerfiles/entrypoint-dev-ssh.sh
depends_on: []
resque: &resque
<<: *rails
image: markus-dev-resque:1.2.0
entrypoint: .dockerfiles/entrypoint-dev-wait-for-install.sh
command: bundle exec rails resque:work QUEUE=* TERM_CHILD=1
depends_on:
- redis
ports: []
resque-scheduler:
<<: *resque
image: markus-dev-resque-scheduler:1.2.0
command: bundle exec rails resque:scheduler
postgres:
image: postgres:14
volumes:
- postgres:/var/lib/postgresql/data
- log:/root/log:cached
- tmp:/app/tmp
environment:
- POSTGRES_PASSWORD=docker
- POSTGRES_INITDB_ARGS="-A md5"
ports:
- '35432:5432'
redis:
image: redis:7
volumes:
- redis:/data
ports:
- 6379
webpack:
<<: *app
image: markus-dev-webpack:1.2.0
entrypoint: .dockerfiles/entrypoint-dev-webpack.sh
command: npm run build-dev
volumes:
- bundle:/bundle
- node_modules:/app/node_modules
- .:/app:cached
environment:
- NODE_ENV=${NODE_ENV:-development}
- RAILS_ENV=${RAILS_ENV:-development}
- PGDATABASE=markus_development
- PGDATABASETEST=markus_test
volumes:
app_data:
repos:
postgres:
redis:
bundle:
node_modules:
tmp:
log:
python:
networks:
markus_dev:
name: markus_dev