Skip to content

Commit

Permalink
Yacht: Use Docker socket proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
owine committed Feb 5, 2024
1 parent 14529a5 commit b61be57
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 9 additions & 1 deletion roles/yacht/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
# GNU General Public License v3.0 #
##########################################################################
---
################################
# Docker Socket Proxy
################################

yacht_docker_socket_proxy_envs:
CONTAINERS: "1"
POST: "0"

################################
# Basics
################################
Expand Down Expand Up @@ -80,6 +88,7 @@ yacht_docker_envs_default:
PGID: "{{ gid }}"
ADMIN_EMAIL: "{{ user.email }}"
SECRET_KEY: "{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=16') }}"
DOCKER_HOST: "tcp://{{ yacht_name }}-docker-socket-proxy:2375"
yacht_docker_envs_custom: {}
yacht_docker_envs: "{{ yacht_docker_envs_default
| combine(yacht_docker_envs_custom) }}"
Expand All @@ -92,7 +101,6 @@ yacht_docker_commands: "{{ yacht_docker_commands_default

# Volumes
yacht_docker_volumes_default:
- "/var/run/docker.sock:/var/run/docker.sock"
- "{{ yacht_paths_location }}/config:/config"
- "{{ yacht_paths_location }}/storage:/storage"
yacht_docker_volumes_custom: []
Expand Down
7 changes: 7 additions & 0 deletions roles/yacht/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
# GNU General Public License v3.0 #
#########################################################################
---
- name: Docker Socket Proxy Role
ansible.builtin.include_role:
name: docker_socket_proxy
vars:
docker_socket_proxy_name: "{{ yacht_name }}-docker-socket-proxy"
docker_socket_proxy_docker_envs: "{{ yacht_docker_socket_proxy_envs }}"

- name: Add DNS record
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/dns/tasker.yml"
vars:
Expand Down

0 comments on commit b61be57

Please sign in to comment.