Rearranging

This commit is contained in:
Devon Mackay 2018-07-01 22:20:31 -04:00
parent a1760b1ee6
commit 08a5a4d8d6
2 changed files with 18 additions and 17 deletions

View File

@ -10,6 +10,18 @@ ARG SITE_PACKAGES_DIR=/usr/local/lib/python3.6/site-packages
ENV APP_DIR "${APP_DIR}"
ENV SKIP_PIPENV true
# Set port to open
EXPOSE "${APP_PORT}"
# Run as the unprivileged APP user
USER "${APP_USER}"
# Use dumb-init for proper signal handling
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Default command is to launch the server
CMD ["bash", "-c", "${APP_DIR}/script/server"]
# Copy installed python packages from the tester image
COPY --from=atst-tester:latest "${SITE_PACKAGES_DIR}" "${SITE_PACKAGES_DIR}"
@ -26,15 +38,3 @@ RUN set -x ; \
# Update file ownership
RUN set -x ; \
chown -R atst:atat "${APP_DIR}"
# Set port to open
EXPOSE "${APP_PORT}"
# Run as the unprivileged APP user
USER "${APP_USER}"
# Use dumb-init for proper signal handling
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Default command is to launch the server
CMD ["bash", "-c", "${APP_DIR}/script/server"]

View File

@ -7,6 +7,12 @@ ARG CIBUILD=true
ENV SKIP_PIPENV true
# Use dumb-init for proper signal handling
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Default command is to run all the tests
CMD ["${APP_DIR}/script/cibuild"]
# Create application directory
RUN set -x ; \
mkdir -p ${APP_DIR}
@ -25,8 +31,3 @@ RUN set -x ; \
RUN set -x ; \
script/setup
# Use dumb-init for proper signal handling
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
# Default command is to run all the tests
CMD ["${APP_DIR}/script/cibuild"]