You've already forked docker-ara
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9dec26252a | |||
| acfae94e00 | |||
| 7172bbf4e0 | |||
| 9511f003d1 | |||
| 66a7f6d86b | |||
| 7a1184375d | |||
| c107e646a4 | |||
| fd863473e3 | |||
| ad6e5acbf2 |
19
Dockerfile
19
Dockerfile
@@ -1,28 +1,29 @@
|
|||||||
FROM almalinux:9.5
|
FROM almalinux:9-minimal
|
||||||
ARG DEV_DEPENDENCIES="gcc python3-devel postgresql-devel mariadb-devel"
|
ARG DEV_DEPENDENCIES="gcc python3-devel postgresql-devel mariadb-devel"
|
||||||
|
|
||||||
RUN dnf update -y \
|
RUN microdnf install -y epel-release \
|
||||||
|
&& crb enable \
|
||||||
|
&& dnf update -y \
|
||||||
&& dnf install -y which \
|
&& dnf install -y which \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-wheel \
|
|
||||||
postgresql \
|
postgresql \
|
||||||
libpq \
|
libpq \
|
||||||
mariadb-connector-c
|
mariadb-connector-c
|
||||||
|
|
||||||
# Install development dependencies required for installing packages from PyPI
|
# Install development dependencies required for installing packages from PyPI
|
||||||
RUN dnf install -y ${DEV_DEPENDENCIES}
|
RUN microdnf install -y ${DEV_DEPENDENCIES}
|
||||||
|
|
||||||
# Install ara from PyPI with API server extras for dependencies (django & django-rest-framework)
|
# Install ara from PyPI with API server extras for dependencies (django & django-rest-framework)
|
||||||
# including database backend libraries and gunicorn
|
# including database backend libraries and gunicorn
|
||||||
RUN python3 -m pip install "ara[server,postgresql,mysql]" gunicorn
|
RUN python3 -m pip install "ara[server,mysql]" gunicorn
|
||||||
|
|
||||||
# Remove development dependencies and clean up
|
# Remove development dependencies and clean up
|
||||||
RUN dnf remove -y ${DEV_DEPENDENCIES} \
|
RUN microdnf remove -y ${DEV_DEPENDENCIES} \
|
||||||
&& dnf autoremove -y \
|
&& microdnf autoremove -y \
|
||||||
&& dnf clean all \
|
&& microdnf clean all \
|
||||||
&& python3 -m pip cache purge
|
&& python3 -m pip cache purge
|
||||||
|
|
||||||
# Set up the container to execute SQL migrations and run the API server with gunicorn
|
# Set up the container to execute SQL migrations and run the API server with gunicorn
|
||||||
ENV ARA_BASE_DIR=/opt/ara
|
ENV ARA_BASE_DIR=/opt/ara
|
||||||
CMD ["bash", "-c", "/usr/local/bin/ara-manage migrate && python3 -m gunicorn --workers=4 --access-logfile - --bind 0.0.0.0:8000 ara.server.wsgi" ]
|
CMD ["/bin/bash", "-c", "/usr/local/bin/ara-manage migrate && python3 -m gunicorn --workers=4 --access-logfile - --bind [::]:8000 --access-logformat '%({x-forwarded-for}i)s %l %u %t \\\"%r\\\" %s %b \\\"%f\\\" \\\"%a\\\"' ara.server.wsgi"]
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
Reference in New Issue
Block a user