Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Merge requests
!90
include TRANSLATIONS_DIR as environment variable in the Docker image
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
include TRANSLATIONS_DIR as environment variable in the Docker image
feature/update-dockerfile
into
develop
Overview
35
Commits
8
Pipelines
11
Changes
2
Merged
Karel van Klink
requested to merge
feature/update-dockerfile
into
develop
1 year ago
Overview
35
Commits
8
Pipelines
11
Changes
2
Expand
0
0
Merge request reports
Viewing commit
fb57ae23
Prev
Next
Show latest version
2 files
+
20
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
fb57ae23
add an entrypoint for running the db migrations in runtime
· fb57ae23
Karel van Klink
authored
1 year ago
Dockerfile
+
6
−
13
Options
@@ -2,7+2,7 @@
WORKDIR
/app
ARG
ARTIFACT_VERSION
RUN
apk add
--no-cache
gcc libc-dev libffi-dev
&&
\
addgroup
-S
appgroup
&&
adduser
-S
appuser
-G
appgroup
-h
/app
USER
appuser
@@ -17,7+17,7 @@
# NOTE: a real config must be mounted at /etc/gso/config.json when running the container
RUN
mkdir
-p
/etc/gso
&&
\
chown
-R
appuser:appgroup /etc/gso
COPY
--chown=appuser:appgroup gso/oss-params-example.json /etc/gso/config.json
# Expose port 8080 for the FastAPI application
EXPOSE
8080
COPY
--chown=appuser:appgroup gso/oss-params-example.json /app/config.json
# The app reads the configuration from this location.
# No need to set environment variables in your docker-compose.
ENV
OSS_PARAMS_FILENAME=/
etc/gso
/config.json
ENV
OSS_PARAMS_FILENAME=/
app
/config.json
# Set the environment variable for the translations directory
ENV
TRANSLATIONS_DIR=/app/gso/translations/
# Run database migrations
RUN
mv
gso/migrations gso/migrations_temp
RUN
PYTHONPATH
=
.
python gso/main.py db init
RUN
rm
-rf
gso/migrations
&&
\
mv
gso/migrations_temp gso/migrations
RUN
PYTHONPATH
=
.
python gso/main.py db upgrade heads
# Start the FastAPI application
CMD
["python", "-m", "uvicorn", "gso.main:app", "--host", "0.0.0.0", "--port", "8080"]
COPY
--chown=appuser:appgroup --chmod=755 entrypoint.sh /app/entrypoint.sh
EXPOSE
8080
ENTRYPOINT
["/app/entrypoint.sh"]
Loading