This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2023-09-19 16:03:23 +00:00
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
|
|
|
|
|
|
devicehub:
|
|
|
|
init: true
|
|
|
|
# TODO
|
2023-09-19 16:15:16 +00:00
|
|
|
image: dkr-dsg.ac.upc.edu/devicehub/devicehub:dpp_docker__eafcac09
|
2023-09-19 16:03:23 +00:00
|
|
|
#build .
|
|
|
|
environment:
|
|
|
|
- DB_USER=${DB_USER}
|
|
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
|
|
- DB_HOST=postgres
|
|
|
|
- DB_DATABASE=${DB_DATABASE}
|
|
|
|
- HOST=${HOST}
|
|
|
|
- EMAIL_DEMO=${EMAIL_DEMO}
|
|
|
|
- PASSWORD_DEMO=${PASSWORD_DEMO}
|
|
|
|
- JWT_PASS=${JWT_PASS}
|
|
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
|
|
- API_DLT=${API_DLT}
|
|
|
|
- API_RESOLVER=${API_RESOLVER}
|
|
|
|
- API_DLT_TOKEN=${API_DLT_TOKEN}
|
|
|
|
- DEVICEHUB_HOST=${DEVICEHUB_HOST}
|
|
|
|
- ID_FEDERATED=${ID_FEDERATED}
|
|
|
|
- URL_MANUALS=${URL_MANUALS}
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
volumes:
|
|
|
|
- ${SNAPSHOTS_PATH}:/mnt/snapshots:ro
|
|
|
|
|
|
|
|
postgres:
|
2023-09-19 16:15:16 +00:00
|
|
|
image: dkr-dsg.ac.upc.edu/devicehub/postgres:dpp_docker__eafcac09
|
2023-09-19 16:03:23 +00:00
|
|
|
# 4. To create the database.
|
|
|
|
# 5. Give permissions to the corresponding users in the database.
|
|
|
|
# extra src https://github.com/docker-library/docs/blob/master/postgres/README.md#environment-variables
|
|
|
|
environment:
|
|
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
|
|
- POSTGRES_USER=${DB_USER}
|
|
|
|
- POSTGRES_DB=${DB_DATABASE}
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
# TODO persistence
|
|
|
|
#volumes:
|
|
|
|
# - pg_data:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
|
|
|
|
# TODO https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
|
|
|
|
#nginx
|