This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
83 lines (81 loc) · 1.87 KB
/
docker-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
version: '3'
services:
volume_configurer:
# https://medium.com/ncr-edinburgh/docker-tips-tricks-516b9ba41aa2
# More:
# https://github.com/docker/compose/issues/3270#issuecomment-537763768
image: busybox
volumes:
- shared:/shared:z
- static:/static:z
command: ["/bin/sh", "-c", "
mkdir -p /static;
chmod -R 777 /static;
mkdir -p /shared/sync;
chmod -R 777 /shared/sync;
echo STARTED > /shared/sync/volumesetter && chmod a+r /shared/sync/volumesetter"]
db:
container_name: postgresdb
image: postgres:latest
restart: always
env_file:
- project.env
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres-data1:/var/lib/postgresql/data1:z
plumber:
build:
context: ./
dockerfile: ./rplumber/Dockerfile
container_name: rplumber
command: /app/plumber.R
#command: ["/bin/sh", "-c", "
# Rscript /app/plumber.R;
# Rscript /app/start_idbac.R"]
restart: always
env_file:
- project.env
ports:
- "127.0.0.1:7002:8000"
volumes:
- ./rplumber:/app:z
- shared:/app/uploads:z
web:
build:
context: ./
dockerfile: ./mdb/Dockerfile
container_name: django
command: >
daphne mdb.asgi:application -b 0.0.0.0 -p 8000
env_file:
- project.env
#~ expose:
ports:
- "127.0.0.1:8000:8000" # 8000
depends_on:
- db
- plumber
volumes:
- ./mdb:/home/app/web/:z
- static:/home/app/web/static/:z
- shared:/uploads/:z
environment:
PYTHONUNBUFFERED: 1 # better printing
nginx:
container_name: nginx
image: nginx
restart: always
ports:
- 80:80
volumes:
- ./nginx:/etc/nginx/conf.d:z
- static:/home/app/web/static/:z
depends_on:
- web
- db
- plumber
volumes:
postgres-data1:
static:
shared: