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 }}"
volumes:
- /mnt/data:/data
- ./config.yml:/data/config.yml
environment:
- TZ={{ timezone }}
- DOCKER_HOST=tcp://dind:2375
- DOCKER_HOST=tcp://docker_proxy:2375
restart: unless-stopped
command: forgejo-runner daemon
depends_on:
dind:
condition: service_started
- docker_proxy
dind:
image: docker:dind
privileged: true
command: [dockerd, -H, tcp://0.0.0.0:2375, --tls=false]
docker_proxy:
image: lscr.io/linuxserver/socket-proxy:latest
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 }}"
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
template:
src: files/config.yml
dest: /opt/forgejo-runner/data/config.yml
dest: /opt/forgejo-runner/config.yml
mode: "600"
owner: "{{ docker_user.name }}"
notify: restart forgejo-runner