forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
144 lines (134 loc) · 3.06 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
version: '3.7'
services:
app: &app
build:
context: .
dockerfile: ./.dockerfiles/Dockerfile
target: dev
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'
USER: 'markus'
image: markus-dev:1.0.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
ssh:
build:
context: .
dockerfile: ./.dockerfiles/Dockerfile-ssh
args:
UBUNTU_VERSION: bionic
SSH_USER: git
volumes:
- log:/home/git/log
- repos:/home/git/csc108
environment:
- TZ=America/Toronto
command: /usr/sbin/sshd -D -e
ports:
- '2222:22'
rails: &rails
<<: *app
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__REPOSITORY__SSH_URL=ssh://git@localhost:2222/~/csc108
- MARKUS__REPOSITORY__MARKUS_GIT_SHELL=/markus-git-shell.sh
ports:
- '3000:3000'
volumes:
- app_data:/app/data/dev
- repos:/app/data/dev/repos
- 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
- log:/app/log
- .:/app:cached
depends_on:
- postgres
- redis
- resque
- webpacker
- ssh
resque:
<<: *rails
entrypoint: .dockerfiles/entrypoint-dev-wait-for-install.sh
command: bundle exec rails resque:work QUEUE=* TERM_CHILD=1
depends_on:
- redis
ports: []
postgres:
image: postgres:10
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:3.2-alpine
volumes:
- redis:/data
ports:
- 6379
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
- PGDATABASE=markus_development
- PGDATABASETEST=markus_test
volumes:
app_data:
repos:
postgres:
redis:
bundle:
node_modules:
packs:
packs_test:
tmp:
log:
ssh_pub_key:
name: ssh_pub_key
networks:
markus_dev:
name: markus_dev