2023-09-19 16:03:23 +00:00
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
|
|
|
2023-09-21 16:15:54 +00:00
|
|
|
devicehub-id-server:
|
2023-09-19 16:03:23 +00:00
|
|
|
init: true
|
2023-09-21 16:15:54 +00:00
|
|
|
image: dkr-dsg.ac.upc.edu/devicehub/devicehub:dpp_docker__54511e1b
|
2023-09-19 16:03:23 +00:00
|
|
|
environment:
|
|
|
|
- DB_USER=${DB_USER}
|
|
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
2023-09-21 16:15:54 +00:00
|
|
|
- DB_HOST=postgres-id-server
|
2023-09-19 16:03:23 +00:00
|
|
|
- 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}
|
2023-09-21 16:15:54 +00:00
|
|
|
- DEVICEHUB_HOST=${SERVER_ID_DEVICEHUB_HOST}
|
|
|
|
- ID_FEDERATED=${SERVER_ID_FEDERATED}
|
2023-09-19 16:03:23 +00:00
|
|
|
- URL_MANUALS=${URL_MANUALS}
|
2023-09-21 16:15:54 +00:00
|
|
|
- ID_SERVICE=${SERVER_ID_SERVICE}
|
|
|
|
- AUTHORIZED_CLIENT_URL=${CLIENT_ID_DEVICEHUB_HOST}
|
2023-09-19 16:03:23 +00:00
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
volumes:
|
|
|
|
- ${SNAPSHOTS_PATH}:/mnt/snapshots:ro
|
2023-09-21 16:15:54 +00:00
|
|
|
- shared:/shared:rw
|
2023-09-19 16:03:23 +00:00
|
|
|
|
2023-09-21 16:15:54 +00:00
|
|
|
postgres-id-server:
|
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}
|
2023-09-21 16:15:54 +00:00
|
|
|
# DEBUG
|
|
|
|
#ports:
|
|
|
|
# - 5432:5432
|
|
|
|
# TODO persistence
|
|
|
|
#volumes:
|
|
|
|
# - pg_data:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
devicehub-id-client:
|
|
|
|
init: true
|
|
|
|
image: dkr-dsg.ac.upc.edu/devicehub/devicehub:dpp_docker__54511e1b
|
|
|
|
environment:
|
|
|
|
- DB_USER=${DB_USER}
|
|
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
|
|
- DB_HOST=postgres-id-client
|
|
|
|
- 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=${CLIENT_ID_DEVICEHUB_HOST}
|
|
|
|
- SERVER_ID_HOST=${SERVER_ID_DEVICEHUB_HOST}
|
|
|
|
- ID_FEDERATED=${CLIENT_ID_FEDERATED}
|
|
|
|
- URL_MANUALS=${URL_MANUALS}
|
|
|
|
- ID_SERVICE=${CLIENT_ID_SERVICE}
|
2023-09-19 16:03:23 +00:00
|
|
|
ports:
|
2023-09-21 16:43:59 +00:00
|
|
|
- 5001:5000
|
2023-09-21 16:15:54 +00:00
|
|
|
volumes:
|
|
|
|
- ${SNAPSHOTS_PATH}:/mnt/snapshots:ro
|
|
|
|
- shared:/shared:ro
|
|
|
|
|
|
|
|
postgres-id-client:
|
|
|
|
image: dkr-dsg.ac.upc.edu/devicehub/postgres:dpp_docker__eafcac09
|
|
|
|
# 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}
|
|
|
|
# DEBUG
|
|
|
|
#ports:
|
|
|
|
# - 5432:5432
|
2023-09-19 16:03:23 +00:00
|
|
|
# TODO persistence
|
|
|
|
#volumes:
|
|
|
|
# - pg_data:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
|
2023-09-21 16:15:54 +00:00
|
|
|
# TODO https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/
|
|
|
|
#nginx
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
shared:
|