Skip to content

Instantly share code, notes, and snippets.

@jonjitsu
Created January 18, 2024 14:29
Show Gist options
  • Save jonjitsu/cb05d6cf77411798968d2135acc342d1 to your computer and use it in GitHub Desktop.
Save jonjitsu/cb05d6cf77411798968d2135acc342d1 to your computer and use it in GitHub Desktop.
run gitlab locally
version: '3.7'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'localhost'
container_name: gitlab-ce
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost'
ports:
- '8080:80'
- '8443:443'
volumes:
- '$GITLAB_HOME/config:/etc/gitlab'
- '$GITLAB_HOME/logs:/var/log/gitlab'
- '$GITLAB_HOME/data:/var/opt/gitlab'
networks:
- gitlab
gitlab-runner:
image: gitlab/gitlab-runner:alpine
container_name: gitlab-runner
restart: always
depends_on:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- '$GITLAB_HOME/gitlab-runner:/etc/gitlab-runner'
networks:
- gitlab
networks:
gitlab:
name: gitlab-network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment