Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Website
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
MDM Lab
Website
Commits
f222abff
Commit
f222abff
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
create worker user for backend
parent
2f581cab
No related branches found
No related tags found
1 merge request
!14
Draft: Resolve "Kube: create sidecar container to clean uploaded file"
Pipeline
#125246
passed
1 year ago
Stage: delete-release
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
backend/Dockerfile
+8
-4
8 additions, 4 deletions
backend/Dockerfile
deploy/charts/djangoninja/values.yaml
+2
-2
2 additions, 2 deletions
deploy/charts/djangoninja/values.yaml
with
10 additions
and
6 deletions
backend/Dockerfile
+
8
−
4
View file @
f222abff
...
@@ -14,15 +14,19 @@ RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
...
@@ -14,15 +14,19 @@ RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
FROM
python:3.11.4-slim-bookworm
FROM
python:3.11.4-slim-bookworm
RUN
apt update
-y
&&
apt upgrade
-y
&&
apt
install
-y
python3-dev libpq-dev
RUN
apt update
-y
&&
apt upgrade
-y
&&
apt
install
-y
python3-dev libpq-dev cron
RUN
useradd
-ms
/bin/bash worker
USER
worker
WORKDIR
/code
WORKDIR
/code
COPY
--from=requirements-stage /tmp/requirements.txt /code/requirements.txt
COPY
--chown=worker:worker
--from=requirements-stage /tmp/requirements.txt /code/requirements.txt
RUN
pip
install
--no-cache-dir
--upgrade
-r
/code/requirements.txt
RUN
pip
install
--user
--no-cache-dir
--upgrade
-r
/code/requirements.txt
COPY
. ./
COPY
--chown=worker:worker
. ./
EXPOSE
8000
EXPOSE
8000
...
...
This diff is collapsed.
Click to expand it.
deploy/charts/djangoninja/values.yaml
+
2
−
2
View file @
f222abff
...
@@ -37,8 +37,8 @@ securityContext:
...
@@ -37,8 +37,8 @@ securityContext:
# - ALL
# - ALL
# readOnlyRootFilesystem: true
# readOnlyRootFilesystem: true
runAsNonRoot
:
true
runAsNonRoot
:
true
runAsUser
:
100
1
runAsUser
:
100
0
fsGroup
:
100
1
fsGroup
:
100
0
service
:
service
:
type
:
ClusterIP
type
:
ClusterIP
...
...
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