diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8ac3178544c96ee501eb865c289669dc28900afc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM python:3-alpine AS python_build +COPY requirements.txt /requirements.txt +RUN apk add --no-cache build-base python3-dev openssl-dev libffi-dev xmlsec xmlsec-dev \ + && pip install -r /requirements.txt + +FROM node:alpine AS assets_build +COPY package.json webpack.config.js / +RUN npm install +COPY assets /assets +RUN /node_modules/.bin/webpack-cli + +FROM python:3-alpine +RUN apk add --no-cache xmlsec \ + && mkdir /app +WORKDIR /app +COPY trurt /app/trurt +COPY --from=python_build /usr/local/ /usr/local/ +COPY --from=assets_build /trurt/static /app/trurt/static +CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload 'trurt:create_app()'