Merge branch 'main' of ssh://gitlab.jafner.net:2229/Jafner/homelab
This commit is contained in:
commit
18ae9c6458
@ -3,15 +3,30 @@ stages:
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
# install git
|
||||
- apt-get -y update
|
||||
- apt-get -y install git docker docker-compose
|
||||
- apt-get -y install git
|
||||
# install prerequisites for docker
|
||||
- apt-get -y install ca-certificates curl gnupg lsb-release
|
||||
- curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
# install docker
|
||||
- apt-get -y update
|
||||
- apt-get -y install docker-ce docker-ce-cli containerd.io
|
||||
- docker --version
|
||||
# install docker compose
|
||||
- DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
|
||||
- mkdir -p $DOCKER_CONFIG/cli-plugins
|
||||
- curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
- chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
|
||||
- docker compose version
|
||||
# configure SSH keys
|
||||
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
|
||||
- eval $(ssh-agent -s)
|
||||
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||
- mkdir -p ~/.ssh
|
||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||
|
||||
|
||||
docker-compose-test:
|
||||
image: debian:bullseye
|
||||
stage: test
|
||||
@ -23,7 +38,7 @@ docker-compose-test:
|
||||
script:
|
||||
- find ~+ -type f -name docker-compose.yml > composes.txt
|
||||
- find ~+/server/config/minecraft/ -type f -name *.yml >> composes.txt
|
||||
- for file in `cat composes.txt`; do docker-compose -f $file config; done
|
||||
- for file in `cat composes.txt`; do docker compose -f $file config; done
|
||||
- rm composes.txt
|
||||
|
||||
|
||||
|
@ -26,7 +26,6 @@ services:
|
||||
labels:
|
||||
- traefik.http.routers.gitlab.rule=Host(`gitlab.jafner.net`)
|
||||
- traefik.http.routers.gitlab.tls.certresolver=lets-encrypt
|
||||
- traefik.http.routers.gitlab.middlewares=lan-only@file
|
||||
- traefik.http.services.gitlab.loadbalancer.server.port=80
|
||||
|
||||
networks:
|
||||
|
Loading…
Reference in New Issue
Block a user