From 09cf23554a113187df0f9dbd48685a851008bf2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Wed, 17 Jun 2020 20:08:10 +0200 Subject: [PATCH] Project renaming (#14) * Renaming * Make Django migrations sync to DB availability --- README.md | 2 +- {freedcs => beer}/api/__init__.py | 0 {freedcs => beer}/api/admin.py | 0 {freedcs => beer}/api/apps.py | 0 .../api/migrations/0001_initial.py | 0 .../api/migrations/0002_auto_20200601_1523.py | 0 .../api/migrations/0003_auto_20200602_2128.py | 0 .../api/migrations/0004_device_uuid.py | 0 {freedcs => beer}/api/migrations/__init__.py | 0 {freedcs => beer}/api/models.py | 0 {freedcs => beer}/api/serializers.py | 0 {freedcs => beer}/api/tests.py | 0 {freedcs => beer}/api/tests/sample.json | 0 {freedcs => beer}/api/urls.py | 2 +- {freedcs => beer}/api/views.py | 0 {freedcs/freedcs => beer/beer}/__init__.py | 0 {freedcs/freedcs => beer/beer}/asgi.py | 4 ++-- {freedcs/freedcs => beer/beer}/settings.py | 12 +++++----- {freedcs/freedcs => beer/beer}/urls.py | 2 +- {freedcs/freedcs => beer/beer}/wsgi.py | 4 ++-- {freedcs => beer}/manage.py | 2 +- {freedcs => beer}/telemetry/__init__.py | 0 {freedcs => beer}/telemetry/admin.py | 0 {freedcs => beer}/telemetry/apps.py | 0 .../management/commands/mqtt-to-db.py | 0 .../telemetry/migrations/0001_initial.py | 0 .../migrations/0002_auto_20200601_1557.py | 0 .../migrations/0003_auto_20200602_2131.py | 0 .../migrations/0004_auto_20200602_2132.py | 0 .../migrations/0005_telemetry_clock.py | 0 .../migrations/0006_auto_20200603_1317.py | 0 .../migrations/0007_telemetry_transport.py | 0 .../telemetry/migrations/__init__.py | 0 {freedcs => beer}/telemetry/models.py | 0 {freedcs => beer}/telemetry/serializers.py | 0 {freedcs => beer}/telemetry/tests.py | 0 {freedcs => beer}/telemetry/tests/sample.json | 0 {freedcs => beer}/telemetry/urls.py | 2 +- {freedcs => beer}/telemetry/views.py | 0 docker/django/Dockerfile | 10 +++++---- docker/django/production.py.sample | 6 ++--- docker/docker-compose.prod.yml | 10 ++++----- docker/docker-compose.yml | 22 ++++++++++--------- docker/edge/docker-compose.yml | 6 ++--- docker/mqtt/docker-compose.rabbitmq.yml | 4 ++-- docker/simulator/Dockerfile | 4 ++-- 46 files changed, 48 insertions(+), 44 deletions(-) rename {freedcs => beer}/api/__init__.py (100%) rename {freedcs => beer}/api/admin.py (100%) rename {freedcs => beer}/api/apps.py (100%) rename {freedcs => beer}/api/migrations/0001_initial.py (100%) rename {freedcs => beer}/api/migrations/0002_auto_20200601_1523.py (100%) rename {freedcs => beer}/api/migrations/0003_auto_20200602_2128.py (100%) rename {freedcs => beer}/api/migrations/0004_device_uuid.py (100%) rename {freedcs => beer}/api/migrations/__init__.py (100%) rename {freedcs => beer}/api/models.py (100%) rename {freedcs => beer}/api/serializers.py (100%) rename {freedcs => beer}/api/tests.py (100%) rename {freedcs => beer}/api/tests/sample.json (100%) rename {freedcs => beer}/api/urls.py (96%) rename {freedcs => beer}/api/views.py (100%) rename {freedcs/freedcs => beer/beer}/__init__.py (100%) rename {freedcs/freedcs => beer/beer}/asgi.py (74%) rename {freedcs/freedcs => beer/beer}/settings.py (94%) rename {freedcs/freedcs => beer/beer}/urls.py (96%) rename {freedcs/freedcs => beer/beer}/wsgi.py (74%) rename {freedcs => beer}/manage.py (88%) rename {freedcs => beer}/telemetry/__init__.py (100%) rename {freedcs => beer}/telemetry/admin.py (100%) rename {freedcs => beer}/telemetry/apps.py (100%) rename {freedcs => beer}/telemetry/management/commands/mqtt-to-db.py (100%) rename {freedcs => beer}/telemetry/migrations/0001_initial.py (100%) rename {freedcs => beer}/telemetry/migrations/0002_auto_20200601_1557.py (100%) rename {freedcs => beer}/telemetry/migrations/0003_auto_20200602_2131.py (100%) rename {freedcs => beer}/telemetry/migrations/0004_auto_20200602_2132.py (100%) rename {freedcs => beer}/telemetry/migrations/0005_telemetry_clock.py (100%) rename {freedcs => beer}/telemetry/migrations/0006_auto_20200603_1317.py (100%) rename {freedcs => beer}/telemetry/migrations/0007_telemetry_transport.py (100%) rename {freedcs => beer}/telemetry/migrations/__init__.py (100%) rename {freedcs => beer}/telemetry/models.py (100%) rename {freedcs => beer}/telemetry/serializers.py (100%) rename {freedcs => beer}/telemetry/tests.py (100%) rename {freedcs => beer}/telemetry/tests/sample.json (100%) rename {freedcs => beer}/telemetry/urls.py (97%) rename {freedcs => beer}/telemetry/views.py (100%) diff --git a/README.md b/README.md index c3f9885..450afdb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# freedcs +# beer Playing with IoT diff --git a/freedcs/api/__init__.py b/beer/api/__init__.py similarity index 100% rename from freedcs/api/__init__.py rename to beer/api/__init__.py diff --git a/freedcs/api/admin.py b/beer/api/admin.py similarity index 100% rename from freedcs/api/admin.py rename to beer/api/admin.py diff --git a/freedcs/api/apps.py b/beer/api/apps.py similarity index 100% rename from freedcs/api/apps.py rename to beer/api/apps.py diff --git a/freedcs/api/migrations/0001_initial.py b/beer/api/migrations/0001_initial.py similarity index 100% rename from freedcs/api/migrations/0001_initial.py rename to beer/api/migrations/0001_initial.py diff --git a/freedcs/api/migrations/0002_auto_20200601_1523.py b/beer/api/migrations/0002_auto_20200601_1523.py similarity index 100% rename from freedcs/api/migrations/0002_auto_20200601_1523.py rename to beer/api/migrations/0002_auto_20200601_1523.py diff --git a/freedcs/api/migrations/0003_auto_20200602_2128.py b/beer/api/migrations/0003_auto_20200602_2128.py similarity index 100% rename from freedcs/api/migrations/0003_auto_20200602_2128.py rename to beer/api/migrations/0003_auto_20200602_2128.py diff --git a/freedcs/api/migrations/0004_device_uuid.py b/beer/api/migrations/0004_device_uuid.py similarity index 100% rename from freedcs/api/migrations/0004_device_uuid.py rename to beer/api/migrations/0004_device_uuid.py diff --git a/freedcs/api/migrations/__init__.py b/beer/api/migrations/__init__.py similarity index 100% rename from freedcs/api/migrations/__init__.py rename to beer/api/migrations/__init__.py diff --git a/freedcs/api/models.py b/beer/api/models.py similarity index 100% rename from freedcs/api/models.py rename to beer/api/models.py diff --git a/freedcs/api/serializers.py b/beer/api/serializers.py similarity index 100% rename from freedcs/api/serializers.py rename to beer/api/serializers.py diff --git a/freedcs/api/tests.py b/beer/api/tests.py similarity index 100% rename from freedcs/api/tests.py rename to beer/api/tests.py diff --git a/freedcs/api/tests/sample.json b/beer/api/tests/sample.json similarity index 100% rename from freedcs/api/tests/sample.json rename to beer/api/tests/sample.json diff --git a/freedcs/api/urls.py b/beer/api/urls.py similarity index 96% rename from freedcs/api/urls.py rename to beer/api/urls.py index 256d548..ca0c1b5 100644 --- a/freedcs/api/urls.py +++ b/beer/api/urls.py @@ -1,4 +1,4 @@ -"""freedcs URL Configuration +"""beer URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ diff --git a/freedcs/api/views.py b/beer/api/views.py similarity index 100% rename from freedcs/api/views.py rename to beer/api/views.py diff --git a/freedcs/freedcs/__init__.py b/beer/beer/__init__.py similarity index 100% rename from freedcs/freedcs/__init__.py rename to beer/beer/__init__.py diff --git a/freedcs/freedcs/asgi.py b/beer/beer/asgi.py similarity index 74% rename from freedcs/freedcs/asgi.py rename to beer/beer/asgi.py index b9cf584..ce63ae6 100644 --- a/freedcs/freedcs/asgi.py +++ b/beer/beer/asgi.py @@ -1,5 +1,5 @@ """ -ASGI config for freedcs project. +ASGI config for beer project. It exposes the ASGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'freedcs.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beer.settings') application = get_asgi_application() diff --git a/freedcs/freedcs/settings.py b/beer/beer/settings.py similarity index 94% rename from freedcs/freedcs/settings.py rename to beer/beer/settings.py index cc69dc4..4daeb41 100644 --- a/freedcs/freedcs/settings.py +++ b/beer/beer/settings.py @@ -1,5 +1,5 @@ """ -Django settings for freedcs project. +Django settings for beer project. Generated by 'django-admin startproject' using Django 3.0.6. @@ -52,7 +52,7 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'freedcs.urls' +ROOT_URLCONF = 'beer.urls' TEMPLATES = [ { @@ -70,7 +70,7 @@ TEMPLATES = [ }, ] -WSGI_APPLICATION = 'freedcs.wsgi.application' +WSGI_APPLICATION = 'beer.wsgi.application' # Database @@ -79,8 +79,8 @@ WSGI_APPLICATION = 'freedcs.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'freedcs', - 'USER': 'freedcs', + 'NAME': 'beer', + 'USER': 'beer', 'PASSWORD': 'password', 'HOST': 'timescale', 'PORT': '5432', @@ -136,7 +136,7 @@ MQTT_BROKER = { # If no local_settings.py is availble in the current folder let's try to # load it from the application root try: - from freedcs.production import * + from beer.production import * except ImportError: # If a local_setting.py does not exist # settings in this file only will be used diff --git a/freedcs/freedcs/urls.py b/beer/beer/urls.py similarity index 96% rename from freedcs/freedcs/urls.py rename to beer/beer/urls.py index 1de2c27..0e287d2 100644 --- a/freedcs/freedcs/urls.py +++ b/beer/beer/urls.py @@ -1,4 +1,4 @@ -"""freedcs URL Configuration +"""beer URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ diff --git a/freedcs/freedcs/wsgi.py b/beer/beer/wsgi.py similarity index 74% rename from freedcs/freedcs/wsgi.py rename to beer/beer/wsgi.py index 6c187e8..d2d6dd0 100644 --- a/freedcs/freedcs/wsgi.py +++ b/beer/beer/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for freedcs project. +WSGI config for beer project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'freedcs.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beer.settings') application = get_wsgi_application() diff --git a/freedcs/manage.py b/beer/manage.py similarity index 88% rename from freedcs/manage.py rename to beer/manage.py index c798e31..dde4a44 100755 --- a/freedcs/manage.py +++ b/beer/manage.py @@ -5,7 +5,7 @@ import sys def main(): - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'freedcs.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'beer.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/freedcs/telemetry/__init__.py b/beer/telemetry/__init__.py similarity index 100% rename from freedcs/telemetry/__init__.py rename to beer/telemetry/__init__.py diff --git a/freedcs/telemetry/admin.py b/beer/telemetry/admin.py similarity index 100% rename from freedcs/telemetry/admin.py rename to beer/telemetry/admin.py diff --git a/freedcs/telemetry/apps.py b/beer/telemetry/apps.py similarity index 100% rename from freedcs/telemetry/apps.py rename to beer/telemetry/apps.py diff --git a/freedcs/telemetry/management/commands/mqtt-to-db.py b/beer/telemetry/management/commands/mqtt-to-db.py similarity index 100% rename from freedcs/telemetry/management/commands/mqtt-to-db.py rename to beer/telemetry/management/commands/mqtt-to-db.py diff --git a/freedcs/telemetry/migrations/0001_initial.py b/beer/telemetry/migrations/0001_initial.py similarity index 100% rename from freedcs/telemetry/migrations/0001_initial.py rename to beer/telemetry/migrations/0001_initial.py diff --git a/freedcs/telemetry/migrations/0002_auto_20200601_1557.py b/beer/telemetry/migrations/0002_auto_20200601_1557.py similarity index 100% rename from freedcs/telemetry/migrations/0002_auto_20200601_1557.py rename to beer/telemetry/migrations/0002_auto_20200601_1557.py diff --git a/freedcs/telemetry/migrations/0003_auto_20200602_2131.py b/beer/telemetry/migrations/0003_auto_20200602_2131.py similarity index 100% rename from freedcs/telemetry/migrations/0003_auto_20200602_2131.py rename to beer/telemetry/migrations/0003_auto_20200602_2131.py diff --git a/freedcs/telemetry/migrations/0004_auto_20200602_2132.py b/beer/telemetry/migrations/0004_auto_20200602_2132.py similarity index 100% rename from freedcs/telemetry/migrations/0004_auto_20200602_2132.py rename to beer/telemetry/migrations/0004_auto_20200602_2132.py diff --git a/freedcs/telemetry/migrations/0005_telemetry_clock.py b/beer/telemetry/migrations/0005_telemetry_clock.py similarity index 100% rename from freedcs/telemetry/migrations/0005_telemetry_clock.py rename to beer/telemetry/migrations/0005_telemetry_clock.py diff --git a/freedcs/telemetry/migrations/0006_auto_20200603_1317.py b/beer/telemetry/migrations/0006_auto_20200603_1317.py similarity index 100% rename from freedcs/telemetry/migrations/0006_auto_20200603_1317.py rename to beer/telemetry/migrations/0006_auto_20200603_1317.py diff --git a/freedcs/telemetry/migrations/0007_telemetry_transport.py b/beer/telemetry/migrations/0007_telemetry_transport.py similarity index 100% rename from freedcs/telemetry/migrations/0007_telemetry_transport.py rename to beer/telemetry/migrations/0007_telemetry_transport.py diff --git a/freedcs/telemetry/migrations/__init__.py b/beer/telemetry/migrations/__init__.py similarity index 100% rename from freedcs/telemetry/migrations/__init__.py rename to beer/telemetry/migrations/__init__.py diff --git a/freedcs/telemetry/models.py b/beer/telemetry/models.py similarity index 100% rename from freedcs/telemetry/models.py rename to beer/telemetry/models.py diff --git a/freedcs/telemetry/serializers.py b/beer/telemetry/serializers.py similarity index 100% rename from freedcs/telemetry/serializers.py rename to beer/telemetry/serializers.py diff --git a/freedcs/telemetry/tests.py b/beer/telemetry/tests.py similarity index 100% rename from freedcs/telemetry/tests.py rename to beer/telemetry/tests.py diff --git a/freedcs/telemetry/tests/sample.json b/beer/telemetry/tests/sample.json similarity index 100% rename from freedcs/telemetry/tests/sample.json rename to beer/telemetry/tests/sample.json diff --git a/freedcs/telemetry/urls.py b/beer/telemetry/urls.py similarity index 97% rename from freedcs/telemetry/urls.py rename to beer/telemetry/urls.py index c1d26da..27a4412 100644 --- a/freedcs/telemetry/urls.py +++ b/beer/telemetry/urls.py @@ -1,4 +1,4 @@ -"""freedcs URL Configuration +"""beer URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ diff --git a/freedcs/telemetry/views.py b/beer/telemetry/views.py similarity index 100% rename from freedcs/telemetry/views.py rename to beer/telemetry/views.py diff --git a/docker/django/Dockerfile b/docker/django/Dockerfile index 95f0005..5d5af58 100644 --- a/docker/django/Dockerfile +++ b/docker/django/Dockerfile @@ -6,16 +6,18 @@ RUN apk update && apk add gcc musl-dev postgresql-dev \ FROM python:3.8-alpine ENV PYTHONUNBUFFERED 1 -ENV DJANGO_SETTINGS_MODULE "freedcs.settings" +ENV DJANGO_SETTINGS_MODULE "beer.settings" -RUN apk update && apk add --no-cache postgresql-libs +RUN apk update && apk add --no-cache postgresql-libs \ + && wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-alpine-linux-amd64-v0.6.1.tar.gz -qO- \ + | tar -xz -C /usr/local/bin COPY --from=builder /usr/local/lib/python3.8/site-packages/ /usr/local/lib/python3.8/site-packages/ -COPY --chown=1000:1000 freedcs /srv/app/freedcs +COPY --chown=1000:1000 beer /srv/app/beer COPY --chown=1000:1000 requirements.txt /tmp/requirements.txt RUN pip3 install -r /tmp/requirements.txt && rm /tmp/requirements.txt USER 1000:1000 -WORKDIR /srv/app/freedcs +WORKDIR /srv/app/beer EXPOSE 8000/tcp CMD ["python3", "manage.py", "runserver"] diff --git a/docker/django/production.py.sample b/docker/django/production.py.sample index 6a5dd09..ba18d75 100644 --- a/docker/django/production.py.sample +++ b/docker/django/production.py.sample @@ -1,6 +1,6 @@ # vim: syntax=python -from freedcs import settings +from beer import settings # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'i4z%50+4b4ek(l0#!w2-r1hpo%&r6tk7p$p_-(=6d!c9n=g5m&' @@ -13,8 +13,8 @@ ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'freedcs', - 'USER': 'freedcs', + 'NAME': 'beer', + 'USER': 'beer', 'PASSWORD': 'password', 'HOST': 'timescale', 'PORT': '5432', diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index ad8060b..2267898 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -6,15 +6,15 @@ services: ports: - "80:80" - freedcs: + beer: volumes: - - "./django/production.py.sample:/srv/app/freedcs/freedcs/production.py" - command: ["gunicorn", "-b", "0.0.0.0:8000", "freedcs.wsgi:application"] + - "./django/production.py.sample:/srv/app/beer/beer/production.py" + command: ["gunicorn", "-b", "0.0.0.0:8000", "beer.wsgi:application"] data-migration: volumes: - - "./django/production.py.sample:/srv/app/freedcs/freedcs/production.py" + - "./django/production.py.sample:/srv/app/beer/beer/production.py" mqtt-to-db: volumes: - - "./django/production.py.sample:/srv/app/freedcs/freedcs/production.py" + - "./django/production.py.sample:/srv/app/beer/beer/production.py" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 83938a2..63be72b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -25,7 +25,7 @@ services: <<: *service_default image: timescale/timescaledb:latest-pg12 environment: - POSTGRES_USER: "freedcs" + POSTGRES_USER: "beer" POSTGRES_PASSWORD: "password" volumes: - "pgdata:/var/lib/postgresql/data" @@ -53,14 +53,14 @@ services: # So that Traefik can listen to the Docker events - /var/run/docker.sock:/var/run/docker.sock - freedcs: + beer: <<: *service_default build: context: .. dockerfile: ./docker/django/Dockerfile - image: daniviga/freedcs + image: daniviga/beer volumes: - - "../freedcs:/srv/app/freedcs" + - "../beer:/srv/app/beer" command: ["python3", "manage.py", "runserver", "0.0.0.0:8000"] networks: - net @@ -69,21 +69,23 @@ services: - data-migration - timescale labels: - - "traefik.http.routers.freedcs.rule=PathPrefix(`/`)" + - "traefik.http.routers.beer.rule=PathPrefix(`/`)" data-migration: - image: daniviga/freedcs + image: daniviga/beer volumes: - - "../freedcs:/srv/app/freedcs" - command: ["python3", "manage.py", "migrate", "--noinput"] + - "../beer:/srv/app/beer" + command: ["dockerize", "-wait", "tcp://timescale:5432", "python3", "manage.py", "migrate", "--noinput"] networks: - net + depends_on: + - timescale mqtt-to-db: <<: *service_default - image: daniviga/freedcs + image: daniviga/beer volumes: - - "../freedcs:/srv/app/freedcs" + - "../beer:/srv/app/beer" command: ["python3", "manage.py", "mqtt-to-db"] networks: - net diff --git a/docker/edge/docker-compose.yml b/docker/edge/docker-compose.yml index 2b778ae..663c37d 100644 --- a/docker/edge/docker-compose.yml +++ b/docker/edge/docker-compose.yml @@ -13,7 +13,7 @@ services: <<: *service_default build: context: ../simulator - image: daniviga/freedcs-device-simulator + image: daniviga/beer-device-simulator environment: IOT_HTTP: "http://192.168.10.123:8000" # IOT_SERIAL: "abcd1234" @@ -26,13 +26,13 @@ services: <<: *service_default build: context: ../simulator - image: daniviga/freedcs-device-simulator + image: daniviga/beer-device-simulator environment: IOT_HTTP: "http://192.168.10.123:8000" IOT_MQTT: "192.168.10.123:1883" # IOT_SERIAL: "abcd1234" # IOT_DELAY: 10 IOT_DEBUG: 1 - command: ["/opt/freedcs/device_simulator.py", "-t", "mqtt"] + command: ["/opt/beer/device_simulator.py", "-t", "mqtt"] networks: - localnet diff --git a/docker/mqtt/docker-compose.rabbitmq.yml b/docker/mqtt/docker-compose.rabbitmq.yml index f3f23aa..2f50243 100644 --- a/docker/mqtt/docker-compose.rabbitmq.yml +++ b/docker/mqtt/docker-compose.rabbitmq.yml @@ -4,8 +4,8 @@ services: broker: image: rabbitmq:3-management-alpine # environment: # we use unauth access atm - # RABBITMQ_DEFAULT_VHOST: "freedcs" - # RABBITMQ_DEFAULT_USER: "freedcs" + # RABBITMQ_DEFAULT_VHOST: "beer" + # RABBITMQ_DEFAULT_USER: "beer" # RABBITMQ_DEFAULT_PASS: "password" volumes: - ./mqtt/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins diff --git a/docker/simulator/Dockerfile b/docker/simulator/Dockerfile index 5ec0069..9130f5f 100644 --- a/docker/simulator/Dockerfile +++ b/docker/simulator/Dockerfile @@ -1,7 +1,7 @@ FROM python:3.8-alpine RUN pip3 install urllib3 paho-mqtt -COPY ./device_simulator.py /opt/freedcs/device_simulator.py +COPY ./device_simulator.py /opt/beer/device_simulator.py ENTRYPOINT ["python3"] -CMD ["/opt/freedcs/device_simulator.py"] +CMD ["/opt/beer/device_simulator.py"]