Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/update docker compose #27

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deviceregistry/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env("DEBUG")

ALLOWED_HOSTS = env("ALLOWED_HOSTS", default=["devreg", "127.0.0.1"])
ALLOWED_HOSTS = env("ALLOWED_HOSTS", default=["devreg", "localhost", "127.0.0.1", "[::1]"])


# Application definition
Expand Down
37 changes: 23 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,85 @@
# mittaridatapumppu-deviceregistry

version: '3.8'

services:

endpoint-digita:
image: forumviriumhelsinki/mittaridatapumppu-endpoint
image: ghcr.io/city-of-helsinki/mittaridatapumppu-endpoint
ports:
- "8001:8000"
depends_on:
kafka:
condition: service_healthy
environment:
# Endpoint config
ALLOWED_IP_ADDRESSES: "127.0.0.1"
AUTH_TOKEN: "abcd1234"
DATA_SOURCE_NAME: "digita.thingpark.http"
ENDPOINT_PATH: "/digita/v2"
HTTP_REQUESTHANDLER: "endpoints.digita.aiothingpark"
# Kafka client config
KAFKA_HOST: "kafka"
KAFKA_PORT: 9092
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
KAFKA_GROUP_ID: "digita_dev"
KAFKA_PARSED_DATA_TOPIC_NAME: "digita.parseddata"
KAFKA_RAW_DATA_TOPIC_NAME: "digita.rawdata"
# Debug config
LOG_LEVEL: "DEBUG"
DEBUG: 1

parser-digita:
image: forumviriumhelsinki/mittaridatapumppu-parser
image: ghcr.io/city-of-helsinki/mittaridatapumppu-parser
depends_on:
kafka:
condition: service_healthy
restart: unless-stopped
environment:
# Kafka client config
KAFKA_HOST: "kafka"
KAFKA_PORT: 9092
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
KAFKA_GROUP_ID: "digita_dev"
KAFKA_PARSED_DATA_TOPIC_NAME: "digita.parseddata"
KAFKA_RAW_DATA_TOPIC_NAME: "digita.rawdata"
# Parser config
DEVICE_REGISTRY_URL: "http://devreg:8000/api/v1"
DEVICE_REGISTRY_TOKEN: b48455759b691baf3b811ba437ce9e581fc0a37e
# Debug config
LOG_LEVEL: "DEBUG"
DEBUG: 1
DEV_SERVER: 1
container_name: parser-digita

persister-influxdb:
image: forumviriumhelsinki/mittaridatapumppu-persister
image: ghcr.io/city-of-helsinki/mittaridatapumppu-persister
depends_on:
kafka:
condition: service_healthy
restart: unless-stopped
environment:
# Kafka client config
KAFKA_HOST: "kafka"
KAFKA_PORT: 9092
KAFKA_BOOTSTRAP_SERVERS: "kafka:9092"
KAFKA_GROUP_ID: "digita_dev"
KAFKA_PARSED_DATA_TOPIC_NAME: "digita.parseddata"
KAFKA_RAW_DATA_TOPIC_NAME: "digita.rawdata"
# Persister config
DEVICE_REGISTRY_URL: "http://devreg:8000/api/v1"
DEVICE_REGISTRY_TOKEN: b48455759b691baf3b811ba437ce9e581fc0a37e
# InfluxDB config
INFLUXDB_URL: "https://influx.fvh.io"
INFLUXDB_ORG: "Testing"
INFLUXDB_BUCKET: "DigitaTest"
INFLUXDB_TOKEN: "-DWlK7UjluBsFRgQ6ZTU82zfir89lAdY00hSvm-hhM-z2cmA-TwRekLj4C_KxU4jAU23H3vTkgGIQjqs68xHWg=="
# Debug config
LOG_LEVEL: "DEBUG"
DEBUG: 1
DEV_SERVER: 1
container_name: persister-influxdb

kafka:
image: docker.io/bitnami/kafka:3.4
image: bitnami/kafka:3.4
ports:
- "9092:9092"
volumes:
Expand All @@ -93,24 +103,24 @@ services:
timeout: 5s

devreg:
image: forumviriumhelsinki/mittaridatapumppu-deviceregistry
image: ghcr.io/city-of-helsinki/mittaridatapumppu-deviceregistry
build: .
volumes:
- media:/media
ports:
- "8000:8000"
environment:
# Device registry config
DJANGO_SETTINGS_MODULE: "deviceregistry.settings"
ALLOWED_HOSTS:
SECRET_KEY: # PostgreSQL config

DATABASE_HOST:
DATABASE_USER:
DATABASE_PASSWORD:
DATABASE_PORT:
DEBUG: 1
ALLOWED_HOSTS:
SECRET_KEY:

DATABASE_PORT: # Debug config

container_name: deviceregistry
DEBUG: 1
depends_on:
- db

Expand All @@ -120,7 +130,6 @@ services:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres

volumes:
- postgres_data:/var/lib/postgresql/data/

Expand Down