2023-09-29 08:51:48 +00:00
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
|
|
|
|
|
|
devicehub:
|
|
|
|
init: true
|
2023-10-01 09:11:05 +00:00
|
|
|
image: dkr-dsg.ac.upc.edu/ereuse/devicehub:dpp__bcb4c696
|
2023-09-29 08:51:48 +00:00
|
|
|
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}
|
|
|
|
- DEVICEHUB_HOST=${DEVICEHUB_HOST}
|
|
|
|
- URL_MANUALS=${URL_MANUALS}
|
|
|
|
- AUTHORIZED_CLIENT_URL=${CLIENT_ID_DEVICEHUB_HOST}
|
|
|
|
- DPP_MODULE=n
|
|
|
|
- IMPORT_SNAPSHOTS=${IMPORT_SNAPSHOTS}
|
2023-10-24 06:43:27 +00:00
|
|
|
- DEPLOYMENT=${DEPLOYMENT}
|
2023-09-29 08:51:48 +00:00
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
volumes:
|
|
|
|
- ${SNAPSHOTS_PATH:-./examples/snapshots}:/mnt/snapshots:ro
|
|
|
|
- shared:/shared:rw
|
2023-10-24 06:43:27 +00:00
|
|
|
- app:/opt/devicehub:rw
|
2023-09-29 08:51:48 +00:00
|
|
|
|
|
|
|
postgres:
|
2023-10-01 09:11:05 +00:00
|
|
|
image: dkr-dsg.ac.upc.edu/ereuse/postgres:dpp__bcb4c696
|
2023-09-29 08:51:48 +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-10-24 06:43:27 +00:00
|
|
|
volumes:
|
|
|
|
- pg_data:/var/lib/postgresql/data
|
2023-09-29 08:51:48 +00:00
|
|
|
# DEBUG
|
|
|
|
#ports:
|
|
|
|
# - 5432:5432
|
|
|
|
|
2023-10-24 06:43:27 +00:00
|
|
|
nginx:
|
|
|
|
image: nginx
|
|
|
|
ports:
|
|
|
|
- 8080:8080
|
|
|
|
volumes:
|
|
|
|
- ./docker/nginx-devicehub.nginx.conf:/etc/nginx/nginx.conf:ro
|
2023-09-29 08:51:48 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
shared:
|
2023-10-24 06:43:27 +00:00
|
|
|
pg_data:
|
|
|
|
app:
|