Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Roadmap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robert Goldmann
Roadmap
Commits
7eba99b1
Commit
7eba99b1
authored
4 months ago
by
Robert Goldmann
Browse files
Options
Downloads
Patches
Plain Diff
add Dockerfiles
parent
e2641409
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile_api
+30
-0
30 additions, 0 deletions
Dockerfile_api
Dockerfile_client
+29
-0
29 additions, 0 deletions
Dockerfile_client
with
59 additions
and
0 deletions
Dockerfile_api
0 → 100644
+
30
−
0
View file @
7eba99b1
FROM python:3.12-alpine AS poetry
RUN apk update && apk upgrade && \
apk add curl gcc python3-dev libc-dev build-base linux-headers postgresql-dev && \
rm -rf /var/cache/apk
RUN curl https://install.python-poetry.org | python -
COPY api/pyproject.toml /opt/RoadmapApi/pyproject.toml
COPY api/poetry.lock /opt/RoadmapApi/poetry.lock
COPY api/ /opt/RoadmapApi/src
WORKDIR /opt/RoadmapApi
RUN /root/.local/bin/poetry install --without dev --no-root
RUN ln -s $($HOME/.local/share/pypoetry/venv/bin/poetry env info -p) /opt/RoadmapApi/venv
FROM python:3.12-alpine
RUN apk update && apk upgrade && \
apk add postgresql-libs && \
rm -rf /var/cache/apk
COPY api/ /opt/RoadmapApi/src
COPY --from=poetry /opt/RoadmapApi/venv /opt/RoadmapApi/venv
RUN adduser -D roadmapapi && chown -R roadmapapi:roadmapapi /opt/RoadmapApi
USER roadmapapi
WORKDIR /opt/RoadmapApi/src
EXPOSE 8080
CMD [ "/opt/RoadmapApi/venv/bin/python", "/opt/RoadmapApi/src/RoadmapAPIServer.py"]
This diff is collapsed.
Click to expand it.
Dockerfile_client
0 → 100644
+
29
−
0
View file @
7eba99b1
FROM python:3.12-alpine AS poetry
RUN apk update && apk upgrade && \
apk add curl gcc python3-dev libc-dev build-base linux-headers && \
rm -rf /var/cache/apk
RUN curl https://install.python-poetry.org | python -
COPY client/pyproject.toml /opt/RoadmapClient/pyproject.toml
COPY client/poetry.lock /opt/RoadmapClient/poetry.lock
COPY client/ /opt/RoadmapClient/src
WORKDIR /opt/RoadmapClient
RUN /root/.local/bin/poetry install --without dev --no-root
RUN ln -s $($HOME/.local/share/pypoetry/venv/bin/poetry env info -p) /opt/RoadmapClient/venv
FROM python:3.12-alpine
RUN apk update && apk upgrade && \
rm -rf /var/cache/apk
COPY client/ /opt/RoadmapClient/src
COPY --from=poetry /opt/RoadmapClient/venv /opt/RoadmapClient/venv
RUN adduser -D roadmapclient && chown -R roadmapclient:roadmapclient /opt/RoadmapClient
USER roadmapclient
WORKDIR /opt/RoadmapClient/src
EXPOSE 8080
CMD [ "/opt/RoadmapClient/venv/bin/python", "/opt/RoadmapClient/src/RoadmapClient.py"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment