Deployment
.gitlab-ci.yml (extract)
# Name of the job
deploy-job:
# Stage of the job execution
stage: deploy
# Image to use for job. Here we use the officila dokku image,
# https://dokku.com/docs/deployment/continuous-integration/gitlab-ci/
image: dokku/ci-docker-image
# Setting some variables, local to the job
variables:
# We don't need history, just the last version
GIT_DEPTH: 0
# The name of our application, here we use something for our preprod
# It will result in https://$DOKKU_APP_NAME.dokku.tecture.de as URL
DOKKU_APP_NAME: geisel-spring-app-staging
# The URL of the git repository on the dokku server
GIT_REMOTE_URL: ssh://dokku@192.168.1.120:22/$DOKKU_APP_NAME
# Restrict the job to dev branch
only:
- dev
# The script of the job. Here we deploy
script:
- dokku-deploy
system.properties (needed at the application root to define the right java version)
java.runtime.version=21