diff --git a/playbook.yml b/playbook.yml index bca602f..4caf8a3 100644 --- a/playbook.yml +++ b/playbook.yml @@ -16,7 +16,6 @@ - { role: home_assistant, tags: ["home_assistant"] } - { role: n8n, tags: ["n8n"] } - { role: matrix, tags: ["matrix"] } -# - { role: gitlab, tags: ["gitlab"] } - { role: gitea, tags: ["gitea"] } - { role: iptables, tags: ["iptables"] } - { role: borg, tags: ["borg"] } diff --git a/roles/gitea/templates/docker-compose.yml b/roles/gitea/templates/docker-compose.yml index bf64991..966edd5 100644 --- a/roles/gitea/templates/docker-compose.yml +++ b/roles/gitea/templates/docker-compose.yml @@ -6,6 +6,10 @@ services: environment: - USER_UID=1000 - USER_GID=1000 + - GITEA__service__DISABLE_REGISTRATION=true + - GITEA__actions__ENABLED=true + - GITEA__actions__DEFAULT_ACTIONS_URL=self + - GITEA__packages__ENABLED=true container_name: gitea restart: unless-stopped volumes: diff --git a/roles/gitlab/tasks/base.yml b/roles/gitlab/tasks/base.yml deleted file mode 100644 index 13f063d..0000000 --- a/roles/gitlab/tasks/base.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- - -- name: Check gitlab directory exist - ansible.builtin.file: - path: gitlab - state: directory - -- name: Copy template conf - ansible.builtin.template: - src: "{{ item.src }}" - dest: "gitlab/{{ item.dest }}" - loop: - - { src: 'docker-compose.yml', dest: 'docker-compose.yml' } - register: gitlab_copy_templates_results - -- name: Update and restart container - community.docker.docker_compose: - project_src: gitlab - state: present - pull: true - restarted: "{{ gitlab_copy_templates_results.changed }}" - become: true \ No newline at end of file diff --git a/roles/gitlab/tasks/main.yml b/roles/gitlab/tasks/main.yml deleted file mode 100644 index c4e7ea2..0000000 --- a/roles/gitlab/tasks/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -- ansible.builtin.import_tasks: base.yml - name: base diff --git a/roles/gitlab/templates/docker-compose.yml b/roles/gitlab/templates/docker-compose.yml deleted file mode 100644 index 42ef84e..0000000 --- a/roles/gitlab/templates/docker-compose.yml +++ /dev/null @@ -1,92 +0,0 @@ -version: '3' - -services: - gitlab: - image: gitlab/gitlab-ce:latest - container_name: gitlab - restart: unless-stopped - environment: - GITLAB_OMNIBUS_CONFIG: | - external_url 'https://gitlab.{{ server.domain }}' - - gitlab_rails['lfs_enabled'] = true - gitlab_rails['gitlab_shell_ssh_port'] = 22 - nginx['listen_port'] = 80 - nginx['listen_https'] = false - nginx['proxy_set_headers'] = { - 'X-Forwarded-Proto' => 'https', - 'X-Forwarded-Ssl' => 'on', - 'Host' => 'gitlab.{{ server.domain }}' - } - - registry['enable'] = true - registry_external_url 'https://registry.{{ server.domain }}' - registry_nginx['listen_port'] = 80 - registry_nginx['listen_https'] = false - - puma['worker_processes'] = 0 - sidekiq['max_concurrency'] = 10 - gitlab_rails['env'] = { - 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000' - } - volumes: - - {{ server.work_dir }}/gitlab/data/:/var/opt/gitlab/ - - {{ server.work_dir }}/gitlab/config/:/etc/gitlab/ - - {{ server.work_dir }}/gitlab/logs/:/var/log/gitlab/ - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - networks: - - proxy - - interne - - metrics - labels: - - traefik.enable=true - - traefik.docker.network=proxy - # HTTP Reverse proxy Gitlab - - traefik.http.routers.gitlab-secure.entrypoints=https - - traefik.http.routers.gitlab-secure.rule=Host(`gitlab.{{ server.domain }}`) - - traefik.http.routers.gitlab-secure.tls=true - - traefik.http.routers.gitlab-secure.tls.certresolver=sslResolver - - traefik.http.routers.gitlab-secure.service=gitlab - - traefik.http.services.gitlab.loadbalancer.server.port=80 - # HTTP Reverse proxy Registry - - traefik.http.routers.gitlab-registry-secure.entrypoints=https - - traefik.http.routers.gitlab-registry-secure.rule=Host(`registry.{{ server.domain }}`) - - traefik.http.routers.gitlab-registry-secure.tls=true - - traefik.http.routers.gitlab-registry-secure.tls.certresolver=sslResolver - - traefik.http.routers.gitlab-registry-secure.service=gitlab-registry - - traefik.http.services.gitlab-registry.loadbalancer.server.port=80 - # TCP SSH Reverse proxy Gitlab - - traefik.tcp.routers.gitlab-ssh.rule=HostSNI(`*`) - - traefik.tcp.routers.gitlab-ssh.entrypoints=ssh - - traefik.tcp.routers.gitlab-ssh.service=gitlab-ssh - - traefik.tcp.services.gitlab-ssh.loadbalancer.server.port=22 - logging: - driver: loki - options: - loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push" - mode: non-blocking - - gitlab-runner: - image: gitlab/gitlab-runner:alpine - container_name: gitlab-runner - restart: unless-stopped - depends_on: - - gitlab - volumes: - - {{ server.work_dir }}/gitlab/runner/:/etc/gitlab-runner/ - - /var/run/docker.sock:/var/run/docker.sock - networks: - - interne - logging: - driver: loki - options: - loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push" - mode: non-blocking - -networks: - interne: - metrics: - external: true - proxy: - external: true