From 2c789549f2f050b03ab8ca0bc8a4bbbdaf650279 Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Wed, 10 Apr 2024 10:29:13 +0200 Subject: [PATCH] Add DockerFiles --- Dockerfile | 22 ++++++++++++++++++++++ docker-compose.yml | 14 ++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ad295a4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# The first instruction is what image we want to base our container on +# We Use an official Python runtime as a parent image +FROM python:3.9 + # sudo apt install --no-cache --virtual pkgconf && \ + # apk add --no-cache mariadb-connector-c-dev && \ + +# The enviroment variable ensures that the python output is set straight +# to the terminal with out buffering it first +ENV PYTHONUNBUFFERED 1 + +# create root directory for our project in the container +RUN mkdir /jw_servicetracker + +# Set the working directory to /music_service +WORKDIR /jw_servicetracker + +# Copy the current directory contents into the container at /music_service +ADD . /jw_servicetracker/ + +# Install any needed packages specified in requirements.txt +# RUN python pip -q install -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..fc917ed --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' + +services: + jw_inventory: + dns: + - 8.8.8.8 + build: . + command: bash -c "python manage.py runserver 0.0.0.0:8000" + container_name: MeetingOrganizer + volumes: + - .:/meetingorganizer + ports: + - "8000:8000" + restart: always \ No newline at end of file