Skip to content
Snippets Groups Projects
Commit 7284f65f authored by nimrod's avatar nimrod
Browse files

Working deployment on host01.shore.co.il.

Can be easily deployed on different hosts by setting different
environment variables (need to document them). No testing/ linting of
any kind (need to do that as well).
parent 533cd04a
No related branches found
No related tags found
No related merge requests found
.env 0 → 100644
COMPOSE_PROJECT_NAME=gitlab-runner
DOCKER_HOST=ssh://host01.shore.co.il
RUNNER_NAME=host01.shore.co.il
FROM gitlab/gitlab-runner:alpine-v13.6.0-rc1
RUN apk add --no-cache --update docker
COPY --chown=root:root entrypoint /entrypoint0
ENV DOCKER_VOLUMES=/var/run/docker.sock:/var/run/docker.sock \
RUNNER_EXECUTOR=docker \
DOCKER_PULL_POLICY=if-not-present
ENTRYPOINT [ "/entrypoint0" ]
CMD [ "run", "--user=gitlab-runner", "--working-directory=/home/gitlab-runner" ]
HEALTHCHECK CMD gitlab-runner list 2>&1 | grep -qF "$CI_SERVER_URL"
---
version: '3.7'
services:
runner:
build:
context: ./
environment:
CI_SERVER_URL: "${CI_SERVER_URL:-https://git.shore.co.il}"
DOCKER_IMAGE: docker:19.03
REGISTRATION_TOKEN: "${REGISTRATION_TOKEN}"
RUNNER_NAME: "${RUNNER_NAME}"
image: adarnimrod/gitlab-runner
restart: always
volumes:
- config:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
volumes:
config:
networks:
default:
name: shore
#!/bin/sh
set -eux
gitlab-runner register --non-interactive
eval exec /entrypoint "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment