-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
86 lines (82 loc) · 2.02 KB
/
docker-compose.dev.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
version: '3'
services:
web:
build: ./ngspice_cloud/
command: "python3 manage.py runserver 0.0.0.0:8000"
# command: "gunicorn -t 120 --reload -b 0.0.0.0:8000 --log-level info ngspice_cloud.wsgi"
ports:
- "8000:8000"
volumes:
- ./ngspice_cloud:/code
- run_vol:/var/run
- cache_vol:/var/cache
- tmp_vol:/tmp
depends_on:
- redis
- db
- celery
environment:
- PYTHONUNBUFFERED=true
- SQL_ENGINE=django.db.backends.postgresql
- SQL_DATABASE=ngspice_cloud_db
- "SQL_USER=${POSTGRES_USER}"
- "SQL_PASSWORD=${POSTGRES_PASSWORD}"
- SQL_HOST=db
- SQL_PORT=5432
- DEBUG=True
links:
- "redis:redis_cache"
- "db:postgres"
celery:
build: ./ngspice_cloud/
command: celery -A ngspice_cloud.celery worker -l info --concurrency=1
links:
- "redis:redis_cache"
- "db:postgres"
environment:
- PYTHONUNBUFFERED=true
- SQL_ENGINE=django.db.backends.postgresql
- SQL_DATABASE=ngspice_cloud_db
- "SQL_USER=${POSTGRES_USER}"
- "SQL_PASSWORD=${POSTGRES_PASSWORD}"
- SQL_HOST=db
- SQL_PORT=5432
- DEBUG=True
volumes:
- ./ngspice_cloud:/code
- run_vol:/var/run
- cache_vol:/var/cache
- tmp_vol:/tmp
depends_on:
- redis
- db
redis:
image: "redis:alpine"
environment:
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
# ports:
# - '6379:6379'
volumes:
- ./redis_data:/data
db:
image: postgres
volumes:
- ./postgres_data:/var/lib/postgresql/data/
environment:
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- POSTGRES_DB=ngspice_cloud_db
volumes:
run_vol:
driver_opts:
type: tmpfs
device: tmpfs
cache_vol:
driver_opts:
type: tmpfs
device: tmpfs
tmp_vol:
driver_opts:
type: tmpfs
device: tmpfs