Skip to content
Snippets Groups Projects
Commit c0431f55 authored by Maximilian Gruber's avatar Maximilian Gruber
Browse files

add docker compose and adjust dockerfile

parent 07e79c90
No related branches found
No related tags found
No related merge requests found
FROM python:3.9
FROM python:slim-bookworm
# install git and audio stuff
RUN apt-get update
RUN apt-get install -y --no-install-recommends git
RUN apt-get install -y --no-install-recommends alsa-utils
RUN apt-get install -y --no-install-recommends libportaudio2
RUN apt-get install -y --no-install-recommends ffmpeg
RUN rm -rf /var/lib/apt/lists/*
WORKDIR /code
# setup python
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# copy app source code and git-context
COPY ./app /code/app
COPY ./.git /code/.git
# start app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
......@@ -10,7 +10,7 @@ class session:
cocal_session = session()
cocal = cocal_methods.CocalMethods(cocal_session, generate_plots=False)
cocal = cocal_methods.CocalMethods(cocal_session, generate_plots=True)
#cocal.record_and_save_reference(35)
......
services:
backend:
build:
dockerfile: Dockerfile
args:
HTTPS_PROXY: ${HTTPS_PROXY}
HTTP_PROXY: ${HTTP_PROXY}
http_proxy: ${HTTP_PROXY}
https_proxy: ${HTTPS_PROXY}
image: cocal_backend
devices:
- "/dev/tty:/dev/tty" # needs adaption to RaspberryPi
ports:
- 8000:80
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment