-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev_COCKROACHDB.yml
72 lines (70 loc) · 2.6 KB
/
docker-compose-dev_COCKROACHDB.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
#TODO Check for new versions of the base image. If a new version is available, rebuild the image.
version: '3.3'
networks:
app_network:
driver: bridge
services:
app:
build:
context: .
dockerfile: Dockerfile-dev-Windows
command: sh -c "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic --noinput && python manage.py runserver_plus 0.0.0.0:8000 --cert-file cert.cer --key-file key.pem --insecure"
ports:
- 8000:8000
volumes:
- ./app:/app
- ./data/web:/vol/web
- ${USERPROFILE}\AppData\Roaming\postgresql\:/home/django/.postgresql/
environment:
- 'DJANGO_DEBUG=${DJANGO_DEBUG}'
- 'OPENAI_API_KEY=${OPENAI_API_KEY}'
- 'DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}'
- 'DJANGO_ALLOWED_HOSTS=${DOMAIN}'
- 'DJANGO_CSRF_TRUSTED_ORIGINS=${DJANGO_CSRF_TRUSTED_ORIGINS}'
- 'COCKROACH_DB_HOST=${COCKROACH_DB_HOST}'
- 'COCKROACH_DB_NAME=${COCKROACH_DB_NAME}'
- 'COCKROACH_DB_PORT=${COCKROACH_DB_PORT}'
- 'COCKROACH_DB_USER=${COCKROACH_DB_USER}'
- 'COCKROACH_DB_PASSWORD=${COCKROACH_DB_PASSWORD}'
- 'COCKROACH_DB_OPTIONS=${COCKROACH_DB_OPTIONS}'
- 'NADOOIT__API_KEY=${NADOOIT__API_KEY}'
- 'NADOOIT__USER_CODE=${NADOOIT__USER_CODE}'
- 'CELERY_BROKER_URL=redis://redis:6379/0'
networks:
- app_network
depends_on:
- redis
redis:
image: 'redis:latest'
container_name: 'redis'
hostname: 'redis'
networks:
- app_network
celery_worker:
build:
context: .
dockerfile: Dockerfile-dev-Windows
command: sh -c "python -m celery -A nadooit worker --loglevel=info"
volumes:
- ./app:/app
- ./data/web:/vol/web
- ${APPDATA}/postgresql/root.crt:/home/django/.postgresql/root.crt
environment:
- 'DJANGO_DEBUG=${DJANGO_DEBUG}'
- 'OPENAI_API_KEY=${OPENAI_API_KEY}'
- 'DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}'
- 'DJANGO_ALLOWED_HOSTS=${DOMAIN}'
- 'DJANGO_CSRF_TRUSTED_ORIGINS=${DJANGO_CSRF_TRUSTED_ORIGINS}'
- 'COCKROACH_DB_HOST=${COCKROACH_DB_HOST}'
- 'COCKROACH_DB_NAME=${COCKROACH_DB_NAME}'
- 'COCKROACH_DB_PORT=${COCKROACH_DB_PORT}'
- 'COCKROACH_DB_USER=${COCKROACH_DB_USER}'
- 'COCKROACH_DB_PASSWORD=${COCKROACH_DB_PASSWORD}'
- 'COCKROACH_DB_OPTIONS=${COCKROACH_DB_OPTIONS}'
- 'NADOOIT__API_KEY=${NADOOIT__API_KEY}'
- 'NADOOIT__USER_CODE=${NADOOIT__USER_CODE}'
- 'CELERY_BROKER_URL=redis://redis:6379/0'
networks:
- app_network
depends_on:
- redis