Skip to content

README.md Preview Run Gitlab webhook inside docker container

Notifications You must be signed in to change notification settings

wallon-ines/docker-gitlab-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Run Gitlab webhook inside docker container

Docker compose example

version: "3.3"

services:
  web:
    // blah blah blah...
  webhook:
    restart: unless-stopped
    image: libert/docker-gitlab-webhook:latest
    ports:
      - 8080:80
    volumes:
      # Mount this code into /app
      - .:/app
      # Mount the docker socket
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # Mount ssh key
      - /home/user/.ssh:/root/.ssh
    environment:
        REPOSITORY: drupal-composer
        TOKEN: xyzaerty
        BRANCH: test
        COMPOSE_PROJECT_NAME: my_project_directory
        POST_SCRIPT: docker-compose exec -T web /project/scripts/update.sh

/!\ volumes /app and /var/run/docker.sock are required /!*
** .ssh directory is required if you are private project
*

Environment parameters

Parameters Second Header
REPOSITORY* Gitlab repository name
TOKEN* Gilab token
BRANCH* Git branch
COMPOSE_PROJECT_NAME docker-compose base dir (if use docker-compose in POST_SCRIPT)
PRE_SCRIPT Run script before git pull
POST_SCRIPT Run script after git pull (if launch docker-compose exec don't forget -T parameter)

** *Required parameters **

Result

pull result

Pull example

POST_SCRIPT result

Example

About

README.md Preview Run Gitlab webhook inside docker container

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages