-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added non-OC-image, update build pipeline
- Loading branch information
karmaking
committed
Oct 14, 2024
1 parent
212b609
commit 493dac7
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:3.10 | ||
USER root | ||
COPY . /app | ||
COPY .github/local_settings_container.py /app/apimanager/apimanager/local_settings.py | ||
COPY .github/gunicorn.conf.py /app/gunicorn.conf.py | ||
RUN pip install -r /app/requirements.txt | ||
WORKDIR /app | ||
RUN ./apimanager/manage.py migrate | ||
RUN chgrp -R 0 /app && chmod -R g+rwX /app | ||
USER 501 | ||
WORKDIR /app/apimanager | ||
EXPOSE 8000 | ||
CMD ["gunicorn", "--bind", ":8000", "--config", "../gunicorn.conf.py", "apimanager.wsgi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM python:3.10 AS builder | ||
USER 0 | ||
COPY . /app | ||
RUN cp /app/.github/local_settings_container.py /app/apimanager/apimanager/local_settings.py | ||
RUN pip install -r /app/requirements.txt | ||
RUN chown 501 / | ||
RUN chown -R 501 /app | ||
RUN chgrp -R 0 /app && chmod -R g+rwX /app | ||
USER 1001 | ||
WORKDIR /app | ||
RUN python ./apimanager/manage.py collectstatic --noinput | ||
|
||
FROM nginx:mainline-alpine | ||
USER 0 | ||
#RUN dnf update -y | ||
ADD .github/apimanager.conf "${NGINX_DEFAULT_CONF_PATH}" | ||
COPY --from=builder /app/apimanager/static /opt/app-root/src | ||
RUN chgrp -R 0 /opt/app-root/src/ && chmod -R g+rwX /opt/app-root/src/ | ||
USER 1001 | ||
CMD nginx -g "daemon off;" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
psycopg2 | ||
#Django==1.11.7 | ||
Django==2.2.28 | ||
oauthlib==3.2.2 | ||
|