forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
160 lines (148 loc) · 3.7 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: '3.7'
services:
app: &app
build:
context: .
dockerfile: ./.dockerfiles/Dockerfile
args:
UBUNTU_VERSION: bionic
RUBY_VERSION: '2.5'
PG_MAJOR: '10'
NODE_MAJOR: '12'
YARN_VERSION: '1.13.0'
BUNDLER_VERSION: '1.17.3'
NBCONVERTVENV: '/app/nbconvertvenv'
image: markus-dev:1.0.0
tmpfs:
- /tmp
backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- app_data:/app/data/dev
- repos:/app/data/dev/repos/bare
- bundle:/bundle
- tmp:/app/tmp
- node_modules:/app/node_modules
- packs:/app/public/packs
- packs_test:/app/public/packs-test
- ssh_pub_key:/ssh_pub_key
- authorized_keys:/app/data/dev/keys
- log:/app/log
- .:/app:cached
environment:
- NODE_ENV=development
- RAILS_ENV=development
- REDIS_URL=redis://redis:6379/
- DATABASE_URL=postgres://postgres:postgres@postgres:5432
- BOOTSNAP_CACHE_DIR=/bundle/bootsnap
- WEBPACKER_DEV_SERVER_HOST=webpacker
- WEB_CONCURRENCY=1
- EDITOR=vi
- RAILS_RELATIVE_URL_ROOT=/csc108
- AUTOTEST_SERVER_HOST=autotest
- AUTOTEST_SERVER_USERNAME=docker
- MARKUS_DATA_DIR=/app/data/dev
- MARKUS_REPOSITORY_GIT_SHELL=/usr/local/bin/markus-git-shell.sh
- MARKUS_REPOSITORY_PERMISSION_FILE=/app/data/dev/keys/.access
- MARKUS_REPOSITORY_SSH_URL=ssh://git@localhost:2222/~/csc108
- TZ=America/Toronto
- NBCONVERT=/app/nbconvertvenv/bin/jupyter-nbconvert
networks:
- default
- markus_dev
depends_on:
- postgres
- redis
ssh:
build:
context: ./.dockerfiles
dockerfile: ./Dockerfile-ssh
args:
UBUNTU_VERSION: bionic
SSH_USER: git
volumes:
- log:/home/git/log
- repos:/home/git/csc108
- authorized_keys:/home/git/.ssh/csc108:ro
environment:
- RELATIVE_URL_ROOTS=/csc108 # : separated list
- SSH_USER=git
- TZ=America/Toronto
entrypoint: ./entrypoint-ssh.sh
command: /usr/sbin/sshd -D
ports:
- '2222:22'
rails:
<<: *backend
entrypoint: .dockerfiles/entrypoint-dev-rails.sh
command: rails server -b 0.0.0.0
ports:
- '3000:3000'
depends_on:
- resque
- webpacker
- ssh
resque:
<<: *backend
entrypoint: .dockerfiles/entrypoint-dev-wait-for-install.sh
command: rails resque:work QUEUE=* TERM_CHILD=1
postgres:
image: postgres:10
volumes:
- postgres:/var/lib/postgresql/data
- log:/root/log:cached
- tmp:/app/tmp
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- '35432:5432'
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
ports:
- 6379
test:
<<: *backend
command: /bin/bash
environment:
- NODE_ENV=test
- RAILS_ENV=test
- REDIS_URL=redis://redis:6379/
- DATABASE_URL=postgres://postgres:postgres@postgres:5432
- BOOTSNAP_CACHE_DIR=/bundle/bootsnap
webpacker:
<<: *app
entrypoint: .dockerfiles/entrypoint-dev-wait-for-install.sh
command: ./bin/webpack-dev-server
ports:
- '3035:3035'
volumes:
- bundle:/bundle
- node_modules:/app/node_modules
- packs:/app/public/packs
- packs_test:/app/public/packs-test
- .:/app:cached
environment:
- NODE_ENV=${NODE_ENV:-development}
- RAILS_ENV=${RAILS_ENV:-development}
- WEBPACKER_DEV_SERVER_HOST=0.0.0.0
volumes:
app_data:
repos:
authorized_keys:
postgres:
redis:
bundle:
node_modules:
packs:
packs_test:
tmp:
log:
ssh_pub_key:
name: ssh_pub_key
networks:
markus_dev:
name: markus_dev