-
Notifications
You must be signed in to change notification settings - Fork 0
/
development.yml
106 lines (95 loc) · 2.27 KB
/
development.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
version: "3.9"
############################# NETWORKS
networks:
selab_network:
name: selab_network
driver: bridge
ipam:
config:
- subnet: 192.168.91.0/24
############################# EXTENSIONS
x-common-keys-selab: &common-keys-selab
networks:
- selab_network
security_opt:
- no-new-privileges:true
restart: unless-stopped
environment:
TZ: $TZ
PUID: $PUID
PGID: $PGID
env_file:
- .env
dns:
- 1.1.1.1
- 4.4.4.4
- 8.8.8.8
############################# SERVICES
services:
nginx:
<<: *common-keys-selab
container_name: nginx
image: nginx:alpine-slim
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- ${DATA_DIR}/nginx/nginx.dev.conf:/etc/nginx/nginx.conf:ro
- ${SSL_DIR}:/etc/nginx/ssl:ro
depends_on:
- backend
- frontend
backend:
<<: *common-keys-selab
container_name: backend
build:
context: $BACKEND_DIR
dockerfile: Dockerfile.dev
command: sh -c "./setup.sh; python manage.py runsslserver 0.0.0.0:8000"
volumes:
- ${BACKEND_DIR}:/code
# TODO: Is this an entire different container worthy?
celery:
<<: *common-keys-selab
container_name: celery
build:
context: $BACKEND_DIR
dockerfile: Dockerfile.dev
command: sh -c "./setup.sh && celery -A ypovoli worker -l DEBUG"
volumes:
- ${BACKEND_DIR}:/code
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
depends_on:
- backend
- redis
frontend:
<<: *common-keys-selab
container_name: frontend
build:
context: $FRONTEND_DIR
dockerfile: Dockerfile.dev
command: sh -c "npm install && npm run host"
volumes:
- ${FRONTEND_DIR}:/app
depends_on:
- backend
docs:
<<: *common-keys-selab
container_name: docs
build:
context: $DOCS_DIR
dockerfile: Dockerfile.dev
command: sh -c "npm install && npm run host"
volumes:
- ${DOCS_DIR}:/docs
redis:
<<: *common-keys-selab
container_name: redis
image: redis:latest
expose:
- $REDIS_PORT
entrypoint: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
volumes:
- ${DATA_DIR}/redis:/data