-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,244 additions
and
130 deletions.
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 |
---|---|---|
@@ -1,29 +1,35 @@ | ||
FROM python:3.6-slim | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get update -qq && \ | ||
apt-get install -y --no-install-recommends \ | ||
build-essential && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | ||
mkdir /app | ||
|
||
WORKDIR /app | ||
|
||
# Copy as early as possible so we can cache ... | ||
COPY requirements.txt . | ||
|
||
RUN pip install -r requirements.txt --no-cache-dir | ||
|
||
COPY . . | ||
|
||
RUN pip install -e . --no-cache-dir | ||
FROM python:3.6-alpine as python_builder | ||
RUN apk update && \ | ||
apk add \ | ||
build-base \ | ||
curl \ | ||
git | ||
|
||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | ||
ENV PATH "/root/.poetry/bin:/opt/venv/bin:${PATH}" | ||
|
||
COPY poetry.lock pyproject.toml /opt/project/ | ||
RUN python -m venv /opt/venv && \ | ||
source /opt/venv/bin/activate && \ | ||
pip install -U pip && \ | ||
cd /opt/project && \ | ||
poetry install --no-dev --no-interaction | ||
|
||
COPY . /opt/project | ||
RUN source /opt/venv/bin/activate && \ | ||
cd /opt/project && \ | ||
poetry install --no-dev --no-interaction | ||
|
||
FROM python:3.6-alpine | ||
RUN apk update && apk add bash | ||
|
||
COPY --from=python_builder /opt /opt | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
VOLUME ["/app/actions"] | ||
|
||
EXPOSE 5055 | ||
|
||
ENTRYPOINT ["./entrypoint.sh"] | ||
ENTRYPOINT ["./opt/project/entrypoint.sh"] | ||
|
||
CMD ["start", "--actions", "actions.actions"] |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.