Reset to HoopScout v2 runtime foundation and simplified topology
This commit is contained in:
12
Dockerfile
12
Dockerfile
@ -32,23 +32,19 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends libpq5 postgresql-client curl nodejs npm \
|
||||
&& apt-get install -y --no-install-recommends libpq5 postgresql-client curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd --gid "${APP_GID}" "${APP_USER}" \
|
||||
&& useradd --uid "${APP_UID}" --gid "${APP_GID}" --create-home --shell /usr/sbin/nologin "${APP_USER}"
|
||||
RUN printf '%s\n' 'export PATH="/opt/venv/bin:/home/app/.local/bin:$PATH"' > /etc/profile.d/hoopscout-path.sh
|
||||
|
||||
COPY --from=builder /opt/venv /opt/venv
|
||||
COPY . /app
|
||||
|
||||
RUN if [ -f package.json ]; then npm install --no-audit --no-fund; fi
|
||||
RUN if [ -f package.json ]; then npm run build; fi
|
||||
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
RUN mkdir -p /app/staticfiles /app/media /app/runtime /app/node_modules /app/static/vendor \
|
||||
RUN chmod +x /app/entrypoint.sh \
|
||||
&& mkdir -p /app/staticfiles /app/media /app/snapshots/incoming /app/snapshots/archive /app/snapshots/failed \
|
||||
&& chown -R "${APP_UID}:${APP_GID}" /app /opt/venv
|
||||
|
||||
USER ${APP_UID}:${APP_GID}
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000"]
|
||||
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3", "--access-logfile", "-", "--error-logfile", "-"]
|
||||
|
||||
Reference in New Issue
Block a user