Commit 4d04569f authored by Raphael Beer's avatar Raphael Beer

Fix: some docker specifics

parent f8897cec
FROM python:3.7-slim-buster
RUN apt update
RUN apt install gcc python3-dev -y
RUN mkdir /app
ADD . /app
ENV NO_VENV=1
WORKDIR /app
RUN ./bin/install.sh
......@@ -6,10 +6,14 @@ if ! hash python3 &> /dev/null; then
fi
echo "OK"
if [ ! -f .venv/bin/activate ]; then
echo "Creating new venv in: ./.venv"
python3 -m venv ./.venv
fi
if [ "$NO_VENV" != "1" ]; then
if [ ! -f .venv/bin/activate ]; then
echo "Creating new venv in: ./.venv"
python3 -m venv ./.venv
fi
echo "Loading virtualenv: ./.venv"
source ./.venv/bin/activate
echo "Loading virtualenv: ./.venv"
source ./.venv/bin/activate
else
echo "Skipping venv setup"
fi
#!/usr/bin/env bash
source ./_venv
source ./bin/_venv
if [ "$1" != "" ] && [ -f $1 ]; then
echo "Using provided .env file: $1"
......
......@@ -8,6 +8,6 @@ pip3 install -r requirements.txt --no-cache-dir
if [ $? -eq 0 ]; then
echo -e "\n----------------------------"
echo -e "Almost done! \\o/\n"
echo "Run 'PYTHON_ENV=[development|prodcution] ./docker-entry.sh .env.example' to start the server!"
echo "Run 'PYTHON_ENV=[development|prodcution] ./bin/docker-entry.sh .env.example' to start the server!"
echo -e "\nIf you want to make changes to the python packages, e.g. 'pip3 install ...', activate the venv, first: '. .venv/bin/activate'"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment