Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IRISCC-Dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
KIT
imkasf-top
IRISCC-Dashboard
Commits
dec17159
Commit
dec17159
authored
1 week ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
add deploy stage to ci script
parent
e3d196e8
No related branches found
No related tags found
1 merge request
!11
draft auto-deployment
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+2
-0
2 additions, 0 deletions
.dockerignore
.gitlab-ci.yml
+25
-23
25 additions, 23 deletions
.gitlab-ci.yml
Dockerfile
+5
-2
5 additions, 2 deletions
Dockerfile
with
32 additions
and
25 deletions
.dockerignore
+
2
−
0
View file @
dec17159
...
...
@@ -3,6 +3,7 @@ Dockerfile
.git
.gitignore
__pycache__/
.ruff_cache
*.pyc
*.pyo
*.pyd
...
...
@@ -14,3 +15,4 @@ env/
*.sqlite3
instance/
experiments/
testdata/
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
25
−
23
View file @
dec17159
...
...
@@ -3,6 +3,9 @@ stages:
# - build_and_deploy
variables
:
APP_NAME
:
iriscc-dashboard
HOST_PORT
:
19000
CONTAINER_PORT
:
19000
UV_VERSION
:
0.6
PYTHON_VERSION
:
3.12
BASE_LAYER
:
bookworm-slim
...
...
@@ -30,26 +33,25 @@ test:
-
uv cache prune --ci
only
:
-
tags
#
#
# # Build and deploy the Docker container directly on the server
# build_and_deploy:
# stage: build_and_deploy
# script:
# - echo "Starting build and deployment of $APP_NAME version $CI_COMMIT_TAG"
# # Build the Docker image locally
# - docker build -t $APP_NAME:$CI_COMMIT_TAG .
# # Stop and remove existing container if it exists
# - |
# if docker ps -a | grep -q $APP_NAME; then
# docker stop $APP_NAME
# docker rm $APP_NAME
# fi
# # Start the new container
# - docker run -d --name $APP_NAME -p $HOST_PORT:$CONTAINER_PORT --restart unless-stopped $APP_NAME:$CI_COMMIT_TAG
# - echo "Build and deployment complete!"
# only:
# - tags
# # This ensures the job runs on the specific runner on your server
# tags:
# - deployment-server
# Build and deploy the Docker container directly on the server
build_and_deploy
:
stage
:
build_and_deploy
script
:
-
echo "Starting build and deployment of $APP_NAME version $CI_COMMIT_TAG"
# Build the Docker image locally
-
docker build -t $APP_NAME:$CI_COMMIT_TAG .
# Stop and remove existing container if it exists
-
|
if docker ps -a | grep -q $APP_NAME; then
docker stop $APP_NAME
docker rm $APP_NAME
fi
# Start the new container
-
docker run -d --name $APP_NAME -p $HOST_PORT:$CONTAINER_PORT --env-file ./.env --restart unless-stopped $APP_NAME:$CI_COMMIT_TAG
-
echo "Build and deployment complete!"
only
:
-
tags
# This ensures the job runs on the specific runner on your server
tags
:
-
deployment-server
This diff is collapsed.
Click to expand it.
Dockerfile
+
5
−
2
View file @
dec17159
# ###
# generated with Gemini 2.5 pro/experimental
# ###
# generated with Gemini 2.5 pro/experimental, revised.
#
# build: 'docker build -t iriscc-dash . --debug'
# run: 'docker run -p 19000:19000 --env-file ./.env -e DEBUG_MODE=True iriscc-dash'
# ###
# Use an official Python runtime as a parent image
# Choose a specific version for reproducibility, -slim versions are smaller
FROM
python:3.12-slim
...
...
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