-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-dev.yml
116 lines (110 loc) · 3.36 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
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
version: '2'
x-devdatamart-defaults: &devdatamart_defaults
build:
context: .
dockerfile: ./Dockerfile-dev
depends_on:
- db
- redis
volumes:
- "$PWD:/code"
environment:
DEBUG: 0
DATABASE_URL: postgis://postgres:@db:5432/etools_datamart
#NOTE: Please update ETOOLS DB server IP/name and port specific to your enviroment.
DATABASE_URL_ETOOLS: postgis://postgres:@192.168.139.128:25432/etools
DATABASE_URL_PRP: postgis://postgres:@db-prp:5432/prp
AUTOCREATE_USERS: "admin,123"
CACHE_URL: "redis://redis:6379/1"
CACHE_URL_LOCK: "redis://redis:6379/1"
CACHE_URL_API: "redis://redis:6379/1"
CACHE_URL_TEMPLATE: "redis://redis:6379/1"
CELERY_BROKER_URL: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/2"
CSRF_COOKIE_SECURE: 0
SECURE_BROWSER_XSS_FILTER: 0
SECURE_CONTENT_TYPE_NOSNIFF: 0
SECURE_FRAME_DENY: 0
SECURE_HSTS_PRELOAD: 0
SECURE_SSL_REDIRECT: 0
SESSION_COOKIE_HTTPONLY: 0
SESSION_COOKIE_SECURE: 0
STATIC_ROOT: /code/src/etools_datamart/apps/web/static/
GEOS_LIBRARY_PATH: "/usr/lib/libgeos_c.so.1"
GDAL_LIBRARY_PATH: "/usr/lib/libgdal.so"
EXPORT_FILE_STORAGE: "django.core.files.storage.FileSystemStorage"
services:
proxy:
image: traefik:v2.1
command: --api.insecure=True --providers.docker
ports:
- "8083:80"
- "8084:8080"
container_name: datamart_proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
datamart:
container_name: datamart
<< : *devdatamart_defaults
command: bash -c "python manage.py init-setup --migrate && python manage.py runserver 0.0.0.0:8080"
#command: ls -l
labels:
- "traefik.http.routers.datamart.rule=PathPrefix(`/`)"
- traefik.http.routers.datamart.service=datamart
- traefik.http.services.datamart.loadBalancer.server.port=8080
- traefik.enable=true
volumes:
- $PWD:/code
ports:
- "18080:8080"
beat:
container_name: datamart_beat
<< : *devdatamart_defaults
working_dir: /code/src
command: celery -A etools_datamart beat --loglevel=debug
volumes:
- $PWD:/code
worker:
container_name: datamart_worker
<< : *devdatamart_defaults
working_dir: /code/src
command: celery -A etools_datamart worker --loglevel=debug
volumes:
- $PWD:/code
db:
image: postgis/postgis:12-3.2
container_name: datamart_db
ports:
- "15432:5432"
environment:
POSTGRES_HOST_AUTH_METHOD: trust
#POSTGRES_PASSWORD:
#POSTGRES_USER: postgres
POSTGRES_DB: etools_datamart
volumes:
- "$PWD/build/db:/var/lib/postgresql/data"
# Rely on etools and prp database instances running locally
#db-etools:
# image: postgis/postgis:12-3.2
# container_name: datamart_etools
# shm_size: '1gb'
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD:
# POSTGRES_DB: etools
# volumes:
# - "$PWD/build/etools:/var/lib/postgresql/data"
db-prp:
image: postgis/postgis:12-3.2
shm_size: '1gb'
container_name: datamart_prp
environment:
POSTGRES_HOST_AUTH_METHOD: trust
#POSTGRES_USER: postgres
#POSTGRES_PASSWORD:
POSTGRES_DB: prp
volumes:
- "$PWD/build/prp:/var/lib/postgresql/data"
redis:
image: redis:alpine
container_name: datamart_redis