-
-
Notifications
You must be signed in to change notification settings - Fork 0
Quickstart
There are two ways to run this application:
- With the non-root user (recommended)
- With the root user
Choose the method that best suits your needs.
You also need to create an access token that the application will use to authenticate with your Git provider. See Setup Access Token to create the access token.
After that, check out the Next steps section to continue with the setup.
Deploy the application with the default non-root user by specifying the group_add
option in the docker-compose.yml
file.
Tip
The group_add
option is used to add groups to the user inside the container.
The non-root user usually does not have the required group to access the Docker socket and the group id may vary, so you will need to add the group to the user yourself.
You can find the required group id in the logs by running the application without this option or when a wrong group id is specified. If the error is not shown in the logs, you already have the correct group id specified.
Alternatively, you can run stat -c %g /var/run/docker.sock
or ls -ln /var/run/docker.sock
on the docker host to get the group id.
services:
app:
container_name: doco-cd
image: ghcr.io/kimdre/doco-cd:latest
restart: unless-stopped
ports:
- "80:80"
environment:
GIT_ACCESS_TOKEN: xxx
WEBHOOK_SECRET: xxx
group_add:
- "971" # change to the docker group id shown in the app error logs or in the output of `ls -ln /var/run/docker.sock`
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Deploy the application with the root user by specifying the user
option in the docker-compose.yml
file.
Tip
The user
option is used to specify the user inside the container and can be either a username (e.g. root) or a user id (e.g. 1000).
services:
app:
container_name: doco-cd
image: ghcr.io/kimdre/doco-cd:latest
restart: unless-stopped
ports:
- "80:80"
environment:
GIT_ACCESS_TOKEN: xxx
WEBHOOK_SECRET: xxx
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock
After you have set up the docker-compose.yml
file, you can run the application with the following command:
docker compose up -d
To be able to reach the application via SaaS products like Github or Gitlab, you need to expose the http endpoint of the application to the internet. You can use a reverse proxy like NGINX, Traefik or Caddy for this purpose.
After you have set up the application, you can proceed with the following steps:
- App Settings - Configure the application settings.
- Deploy Settings - Configure the Docker Compose deployment in your repositories.
- Webhook Setup - Set up a webhook for your deployments.