-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
30,123 additions
and
18,454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,91 @@ | ||
version: '2' | ||
services: | ||
# proxy: | ||
# build: ./proxy | ||
# ports: | ||
# - 8000:8000 | ||
# depends_on: | ||
# - datamart | ||
# - flower | ||
|
||
# base: | ||
# build: | ||
# context: . | ||
# dockerfile: ./docker/Dockerfile.alpine.base | ||
# args: | ||
# VERSION: "x.x" | ||
proxy: | ||
image: traefik:v2.1 | ||
command: --api.insecure=True --providers.docker | ||
ports: | ||
- "8083:80" | ||
- "8080:8080" | ||
container_name: datamart_proxy | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
# datamart: | ||
# build: | ||
# context: . | ||
# dockerfile: ./docker/Dockerfile.alpine | ||
# args: | ||
# BASE_IMAGE: "2.11-base" | ||
# environment: &environment | ||
# AUTOCREATE_USERS: "admin,123" | ||
# BASE_IMAGE: "compose" | ||
# 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/1" | ||
# CELERY_RESULT_BACKEND: "redis://redis:6379/1" | ||
## CELERY_BROKER_URL: "amqp://guest:guest@rabbitmq/datamart" | ||
## CELERY_RESULT_BACKEND: "amqp://guest:guest@rabbitmq/datamart" | ||
# CSRF_COOKIE_SECURE: 0 | ||
# DATABASE_URL: postgis://postgres:@db:5432/etools_datamart | ||
# DATABASE_URL_ETOOLS: postgis://postgres:@etools:5432/etools | ||
# DEBUG: 0 | ||
# SECRET_KEY: kuhfjhgfuytfuytfuygfuytdfuydfuygdfuygdfuytf | ||
# SECURE_BROWSER_XSS_FILTER: 0 | ||
# SECURE_CONTENT_TYPE_NOSNIFF: 0 | ||
# SECURE_FRAME_DENY: 0 | ||
# SECURE_HSTS_PRELOAD: 0 | ||
# SECURE_HSTS_SECONDS: 0 | ||
# SECURE_SSL_REDIRECT: 0 | ||
# SESSION_COOKIE_HTTPONLY: 0 | ||
# SESSION_COOKIE_SECURE: 0 | ||
# STATIC_ROOT: /var/datamart/static/ | ||
# STATIC_URL: /dm-static/ | ||
# command: datamart | ||
# ports: | ||
# - 9999:8000 | ||
# depends_on: | ||
# - db | ||
# - etools | ||
# - redis | ||
datamart: | ||
build: | ||
context: . | ||
dockerfile: ./docker/Dockerfile.dev | ||
args: | ||
BASE_IMAGE: "2.11-base" | ||
container_name: datamart | ||
environment: | ||
DEBUG: 1 | ||
DATABASE_URL: postgis://postgres:@db:5432/etools_datamart | ||
DATABASE_URL_ETOOLS: postgis://postgres:@db-etools:5432/etools | ||
DATABASE_URL_PRP: postgis://postgres:@db-prp:5432/prp | ||
AUTOCREATE_USERS: "admin,123" | ||
BASE_IMAGE: "compose" | ||
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/1" | ||
CELERY_RESULT_BACKEND: "redis://redis:6379/1" | ||
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.26" | ||
command: bash -c "python /code/manage.py migrate && python /code/manage.py runserver 0.0.0.0:8080" | ||
volumes: | ||
- "$PWD:/code" | ||
labels: | ||
- "traefik.http.routers.datamart.rule=PathPrefix(`/`)" | ||
- traefik.http.routers.datamart.service=datamart | ||
- traefik.http.services.datamart.loadBalancer.server.port=8080 | ||
- traefik.enable=true | ||
depends_on: | ||
- db | ||
- redis | ||
|
||
db: | ||
image: mdillon/postgis:9.6 | ||
container_name: datamart_db | ||
environment: | ||
POSTGRES_PASSWORD: | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: etools_datamart | ||
volumes: | ||
- "$PWD/~build/db:/var/lib/postgresql/data" | ||
ports: | ||
- 25432:5432 | ||
- "$PWD/build/db:/var/lib/postgresql/data" | ||
|
||
etools: | ||
# Rely on etools and prp database instances running locally | ||
db-etools: | ||
image: mdillon/postgis:9.6 | ||
ports: | ||
- "15432:5432" | ||
container_name: datamart_etools | ||
shm_size: '1gb' | ||
environment: | ||
POSTGRES_PASSWORD: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: | ||
POSTGRES_DB: etools | ||
volumes: | ||
- ${VOLUME_ETOOLS_DATA}:/var/lib/postgresql/data | ||
- "$PWD/build/etools:/var/lib/postgresql/data" | ||
|
||
db-prp: | ||
image: mdillon/postgis:9.6 | ||
shm_size: '1gb' | ||
container_name: datamart_prp | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: | ||
POSTGRES_DB: prp | ||
volumes: | ||
- "$PWD/build/prp:/var/lib/postgresql/data" | ||
|
||
redis: | ||
image: redis:alpine | ||
|
||
container_name: datamart_redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ARG BASE_IMAGE | ||
FROM unicef/datamart:${BASE_IMAGE} | ||
|
||
Add poetry.lock . | ||
Add pyproject.toml . | ||
|
||
RUN apk add bash | ||
RUN mkdir /tmp/static | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV PYTHONPATH /code | ||
ENV DJANGO_SETTINGS_MODULE etools_datamart.config.settings | ||
|
||
VOLUME "./:/code/" | ||
WORKDIR /code/ |
Oops, something went wrong.