added Docker config

geo
Alexander Roidl 2 years ago
parent 389f9b71cb
commit d44f6e77cc

@ -1,7 +1,20 @@
FROM tiangolo/uwsgi-nginx-flask:python3.8-alpine FROM python:3-alpine
RUN apk --update add bash nano
ENV STATIC_URL /static
ENV STATIC_PATH /var/www/app/static
COPY ./requirements.txt /var/www/requirements.txt
RUN pip install -r /var/www/requirements.txt
# Create app directory
WORKDIR /app
# Install app dependencies
COPY requirements.txt ./
RUN pip install -r requirements.txt
#imagemagick
ENV MAGICK_HOME=/usr
RUN apk add --no-cache imagemagick && \
apk add --no-cache imagemagick-dev
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "python3", "run.py"]

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
app="geo.app" app="geo.app"
docker build -t ${app} . docker build -t ${app} .
docker run --platform linux/amd64 -p 56733:80 \ docker run --platform=linux/arm64 -p 56733:80 \
--name=${app} \ --name=${app} \
-v $PWD:/app ${app} -v $PWD:/app ${app}

Loading…
Cancel
Save