-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
185 lines (172 loc) · 4.79 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
version: "3.5"
services:
db:
image: postgres:9.6.10-alpine
user: postgres
environment:
POSTGRES_USER: docker
POSTGRES_PASS: docker
POSTGRES_DB: puzzled
ports:
- "5555:5432"
volumes:
- db_data:/var/lib/postgresql/data
restart: unless-stopped
networks:
- andrea-network
#
# redis:
# image: redis
# expose:
# - 6379
# networks:
# - puzzled-network
build-app-image:
build:
context: .
dockerfile: .docker/web_app.dockerfile
image: jaodur/andrea
command: echo image build complete
volumes:
- .:/app
env_file:
- .env
networks:
- andrea-network
python-ssh-server:
build:
context: .
dockerfile: .docker/python_ssh_server.dockerfile
args:
SSH_USER: ${SSH_USER}
SSH_USER_PASSWORD: ${SSH_USER_PASSWORD}
image: jaodur/python-ssh-server
command: bash -c "chmod u+x /bin/set_global_env.sh &&
chmod u+x /bin/run_python_script.sh &&
set_global_env.sh &&
echo running ssh-server &&
service ssh start && tail -f /dev/null"
ports:
- "${PYTHON_SSH_HOST_PORT}:22"
volumes:
- .docker/configs/sshd.config:/etc/ssh/sshd_config
- .docker/scripts/run_python_script.sh:/bin/run_python_script.sh
- .docker/scripts/set_global_env.sh:/bin/set_global_env.sh
env_file:
- .env
networks:
- andrea-network
restart: unless-stopped
node-ssh-server:
build:
context: .
dockerfile: .docker/node_ssh_server.dockerfile
args:
SSH_USER: ${SSH_USER}
SSH_USER_PASSWORD: ${SSH_USER_PASSWORD}
image: jaodur/node-ssh-server
command: bash -c "chmod u+x /bin/set_global_env.sh &&
chmod u+x /bin/run_node_script.sh &&
set_global_env.sh &&
echo running ssh-server &&
service ssh start && tail -f /dev/null"
ports:
- "${NODE_SSH_HOST_PORT}:22"
volumes:
- .docker/configs/sshd.config:/etc/ssh/sshd_config
- .docker/scripts/run_node_script.sh:/bin/run_node_script.sh
- .docker/scripts/set_global_env.sh:/bin/set_global_env.sh
env_file:
- .env
networks:
- andrea-network
restart: unless-stopped
go-ssh-server:
build:
context: .
dockerfile: .docker/go_ssh_server.dockerfile
args:
SSH_USER: ${SSH_USER}
SSH_USER_PASSWORD: ${SSH_USER_PASSWORD}
image: jaodur/go-ssh-server
command: >
bash -c "chmod u+x /bin/run_go_script.sh &&
chmod u+x /bin/set_global_env.sh &&
chmod u+x /bin/set_go_path.sh &&
set_go_path.sh &&
set_global_env.sh &&
echo running ssh-server &&
service ssh start && tail -f /dev/null"
ports:
- "${GO_SSH_HOST_PORT}:22"
volumes:
- .docker/configs/sshd.config:/etc/ssh/sshd_config
- .docker/scripts/run_go_script.sh:/bin/run_go_script.sh
- .docker/scripts/set_go_path.sh:/bin/set_go_path.sh
- .docker/scripts/set_global_env.sh:/bin/set_global_env.sh
env_file:
- .env
environment:
- GOPATH=/usr/local/go/bin
networks:
- andrea-network
restart: unless-stopped
cpp-ssh-server:
build:
context: .
dockerfile: .docker/cpp_ssh_server.dockerfile
args:
SSH_USER: ${SSH_USER}
SSH_USER_PASSWORD: ${SSH_USER_PASSWORD}
image: jaodur/cpp-ssh-server
command: >
bash -c "chmod u+x /bin/run_cpp_script.sh &&
chmod u+x /bin/set_global_env.sh &&
set_global_env.sh &&
echo running ssh-server &&
service ssh start && tail -f /dev/null"
ports:
- "${CPP_SSH_HOST_PORT}:22"
volumes:
- .docker/configs/sshd.config:/etc/ssh/sshd_config
- .docker/scripts/run_cpp_script.sh:/bin/run_cpp_script.sh
- .docker/scripts/set_global_env.sh:/bin/set_global_env.sh
env_file:
- .env
networks:
- andrea-network
restart: unless-stopped
web:
image: jaodur/andrea
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
stdin_open: true
volumes:
- .:/app
env_file:
- .env
ports:
- "8000:8000"
networks:
- andrea-network
depends_on:
- build-app-image
- python-ssh-server
- node-ssh-server
build-watch:
image: jaodur/andrea
command: bash -c "npm rebuild node-sass && npm run watch"
stdin_open: true
volumes:
- .:/app
ports:
- "3000:3000"
env_file:
- .env
networks:
- andrea-network
networks:
andrea-network:
driver: bridge
volumes:
compiler_data: {}
db_data: {}