Gitlab syntax error in docker-compose
Problem
When deploying gitlab the following error occurs in:
$ systemctl status gitlab
...
Jun 21 08:42:57 server systemd[1]: Started HomelabOS gitlab Service.
Jun 21 08:42:58 server docker-compose[1027950]: yaml.scanner.ScannerError: while scanning a simple key
Jun 21 08:42:58 server docker-compose[1027950]: in "./docker-compose.yml", line 8, column 3
Jun 21 08:42:58 server docker-compose[1027950]: could not find expected ':'
Jun 21 08:42:58 server docker-compose[1027950]: in "./docker-compose.yml", line 10, column 1
Jun 21 08:42:58 server systemd[1]: gitlab.service: Main process exited, code=exited, status=1/FAILURE
Jun 21 08:42:58 server systemd[1]: gitlab.service: Failed with result 'exit-code'.
Jun 21 08:43:01 server systemd[1]: gitlab.service: Scheduled restart job, restart counter is at 22.
Jun 21 08:43:01 server systemd[1]: Stopped HomelabOS gitlab Service.
The docker-compose.yml
head:
---
version: '3'
networks:
traefik_network:
external:
name: homelabos_traefik
gitlab
Additional the Registry docker container has the wrong Host rule for Traefik and responds to gitlab.DOMAIN:
- "traefik.http.routers.registry.rule=Host(`gitlab.DOMAIN`)"
Intermediate Solution
- Add a colon after the
gitlab
: network:
---
version: '3'
networks:
traefik_network:
external:
name: homelabos_traefik
gitlab:
- Change the Host of the
registry
docker container from- Host(gitlab.DOMAIN) to
- Host(registry.DOMAIN)
Edited by Jonathan Pieper