This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
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
43 changed files
with
2,935 additions
and
939 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
./adaptation_layer/.venv | ||
./adaptation_layer/.idea | ||
./adaptation_layer/**/.pytest_cache | ||
./adaptation_layer/**/pytestdebug.log | ||
./adaptation_layer/robotframework | ||
|
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,27 +1,26 @@ | ||
FROM python:3.6 as base | ||
FROM python:3.6-slim as base | ||
EXPOSE 5000 | ||
RUN apt-get update && apt-get install -y python3-dev | ||
RUN ["pip3", "install", "pipenv"] | ||
ENV PIPENV_VENV_IN_PROJECT 1 | ||
RUN apt-get update && apt-get install -y build-essential | ||
RUN ["pip3", "install", "pipenv==2018.11.26"] | ||
WORKDIR /usr/src/app | ||
# copy only pipfiles to install dependencies | ||
COPY ./adaptation_layer/Pipfile . | ||
COPY ./adaptation_layer/Pipfile.lock . | ||
RUN ["pipenv", "install"] | ||
COPY ./adaptation_layer/Pipfile* ./ | ||
RUN ["pipenv", "install", "--system", "--ignore-pipfile", "--deploy"] | ||
COPY ./adaptation_layer . | ||
# setup env variables to initialize database | ||
ARG DB_SEED_NFVO | ||
ENV DB_SEED_NFVO $DB_SEED_NFVO | ||
ARG DB_SEED_NFVO_CRED | ||
ENV DB_SEED_NFVO_CRED $DB_SEED_NFVO_CRED | ||
RUN ["rm", "-f", "data/mso-lo.db"] | ||
RUN ["pipenv", "run", "flask", "db", "upgrade"] | ||
RUN ["pipenv", "run", "python", "manage.py", "seed"] | ||
|
||
FROM base as test | ||
COPY ./openapi ./openapi | ||
RUN ["flask", "db", "upgrade"] | ||
RUN ["python", "manage.py", "seed"] | ||
|
||
FROM base as prod | ||
COPY ./uWSGI/app.ini . | ||
CMD ["pipenv", "run", "uwsgi", "--ini", "app.ini"] | ||
CMD ["uwsgi", "--ini", "app.ini"] | ||
|
||
FROM base as test | ||
RUN ["pipenv", "install", "--system", "--ignore-pipfile", "--deploy", "--dev"] | ||
COPY ./openapi ./openapi | ||
|
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
Oops, something went wrong.