Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suggestible
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
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
open-source
Suggestible
Commits
594ed541
Commit
594ed541
authored
9 months ago
by
Phil Höfer
Browse files
Options
Downloads
Patches
Plain Diff
Initial dockerfile and gitlab ci
parent
0747e33d
No related branches found
No related tags found
1 merge request
!3
Resolve "Add Dockerfile for Easy Deployment"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+39
-0
39 additions, 0 deletions
.gitlab-ci.yml
Dockerfile
+11
-0
11 additions, 0 deletions
Dockerfile
with
50 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
39
−
0
View file @
594ed541
variables
:
DOCKER_HOST
:
"
tcp://docker-dind.gitlab-suma:2375"
DOCKER_BUILD_IMAGE
:
docker:20.10.15
DOCKER_IMAGE_NAME
:
suggestible
DOCKER_TAG_NAME
:
$CI_COMMIT_SHA
HELM_RELEASE_NAME
:
$CI_COMMIT_BRANCH
KUBERNETES_NAMESPACE
:
suggestible
KUBERNETES_DEPLOY_IMAGE
:
alpine/k8s:1.24.4
stages
:
-
build
-
deploy
build
:
stage
:
build
image
:
${DOCKER_BUILD_IMAGE}
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script
:
-
docker build --network=host -t ${CI_REGISTRY_IMAGE}/${DOCKER_IMAGE_NAME}:${DOCKER_TAG_NAME} -f ./Dockerfile .
-
docker push ${CI_REGISTRY_IMAGE}/${DOCKER_IMAGE_NAME}:${DOCKER_TAG_NAME}
after_script
:
-
docker logout $CI_REGISTRY
only
:
-
main
deploy
:
stage
:
deploy
image
:
${KUBERNETES_DEPLOY_IMAGE}
before_script
:
-
kubectl config use-context open-source/metager-keymanager:gitlab-agent
script
:
|
helm -n ${KUBERNETES_NAMESPACE} upgrade --install ${HELM_RELEASE_NAME} chart/ \
--set image.repository=${CI_REGISTRY_IMAGE}/${DOCKER_IMAGE_NAME} \
--set image.tag=${DOCKER_TAG_NAME} \
--set namespace=${KUBERNETES_NAMESPACE}
only
:
-
main
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
11
−
0
View file @
594ed541
# Use the official Rust image as the base
FROM
rust:latest
# Copy the project files to the container
COPY
. .
# Build the project
RUN
make release
# Set the command to run the application
CMD
["./target/release/suggestible"]
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