-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (36 loc) · 1.21 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM python:3.10-alpine as fws_app
WORKDIR /fws
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
# install dependencies from Pipfile.lock
COPY Pipfile Pipfile.lock ./
RUN pip install pipenv
RUN apk add --no-cache libpq
RUN apk add --no-cache --virtual build-dependencies gcc musl-dev libpq-dev python3-dev
RUN pipenv install --deploy --system
RUN apk del --no-cache build-dependencies
# copy over the web application
COPY fws_site ./fws_site
COPY ffxivws ./ffxivws
FROM fws_app as fws_web
RUN pipenv install --deploy --system --categories="web-server"
# install and run server
RUN pip install gunicorn
ENTRYPOINT ["gunicorn", "fws_site.wsgi"]
CMD ["--bind=0.0.0.0:80"]
FROM fws_app as fws_cel
RUN pipenv install --deploy --system --categories="background-worker"
ENTRYPOINT ["celery", "-A", "fws_site"]
FROM fws_app as fws_manage
# copy manage.py and run it
COPY manage.py .
ENTRYPOINT ["python", "manage.py"]
CMD ["help"]
FROM nginx:1.24-alpine as nginx_rev
# remove existing config
RUN rm /etc/nginx/conf.d/*
# Copy new config
COPY deployment/fws_nginx.conf /etc/nginx/conf.d/fws_nginx.conf
# Copy static files
COPY deployment/static_collected/ /web/static/
COPY ffxivws/static/ /web/static/
COPY ffxivws/static/favicon.ico /web/