Stop using DIND for CI

Seems to not play nicely with LXC, and given it runs in its own container already, it's probably fine.
This commit is contained in:
Jake Howard 2024-09-09 12:07:47 +01:00
parent 5706a97b4d
commit 66036cd301
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 23 additions and 16 deletions

View file

@ -4,17 +4,32 @@ services:
user: "{{ docker_user.id }}" user: "{{ docker_user.id }}"
volumes: volumes:
- /mnt/data:/data - /mnt/data:/data
- ./config.yml:/data/config.yml
environment: environment:
- TZ={{ timezone }} - TZ={{ timezone }}
- DOCKER_HOST=tcp://dind:2375 - DOCKER_HOST=tcp://docker_proxy:2375
restart: unless-stopped restart: unless-stopped
command: forgejo-runner daemon command: forgejo-runner daemon
depends_on: depends_on:
dind: - docker_proxy
condition: service_started
dind: docker_proxy:
image: docker:dind image: lscr.io/linuxserver/socket-proxy:latest
privileged: true
command: [dockerd, -H, tcp://0.0.0.0:2375, --tls=false]
restart: unless-stopped restart: unless-stopped
environment:
- POST=1
- CONTAINERS=1
- INFO=1
- IMAGES=1
- VOLUMES=1
- NETWORKS=1
- ALLOW_START=1
- ALLOW_STOP=1
- ALLOW_RESTARTS=1
- EXEC=1
tmpfs:
- /run
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
logging:
driver: none

View file

@ -6,18 +6,10 @@
mode: "{{ docker_compose_directory_mask }}" mode: "{{ docker_compose_directory_mask }}"
become: true become: true
- name: Create data directory
file:
path: /opt/forgejo-runner/data
state: directory
mode: "700"
owner: "{{ docker_user.name }}"
become: true
- name: Install config file - name: Install config file
template: template:
src: files/config.yml src: files/config.yml
dest: /opt/forgejo-runner/data/config.yml dest: /opt/forgejo-runner/config.yml
mode: "600" mode: "600"
owner: "{{ docker_user.name }}" owner: "{{ docker_user.name }}"
notify: restart forgejo-runner notify: restart forgejo-runner