Added more containers and specified more container properties
This commit is contained in:
		@@ -19,14 +19,14 @@
 | 
			
		||||
      become: true
 | 
			
		||||
    - name: Ensure possession of cloned repository with Compose files
 | 
			
		||||
      ansible.builtin.git:
 | 
			
		||||
        repo: senpai@sukaato.moe:repos/sukaato-compose.git
 | 
			
		||||
        repo: senpai@sukaato.moe:repos/sukaato-compose.git # @TODO: replace with Ansible variable
 | 
			
		||||
        dest: ~/dev/sukaato-compose
 | 
			
		||||
        version: latest
 | 
			
		||||
      register: sshgit
 | 
			
		||||
      ignore_errors: true
 | 
			
		||||
    - name: Ensure possession of cloned repository with Compose files
 | 
			
		||||
      ansible.builtin.git:
 | 
			
		||||
        repo: 'https://git.sukaato.moe/' # @TODO: Finish HTTPS URI
 | 
			
		||||
        repo: 'https://git.sukaato.moe/' # @TODO: Finish HTTPS URI (or replace with Ansible variable)
 | 
			
		||||
        dest: ~/dev/sukaato-compose
 | 
			
		||||
        version: latest
 | 
			
		||||
      register: webgit
 | 
			
		||||
@@ -46,8 +46,8 @@
 | 
			
		||||
          ansible.builtin.command:
 | 
			
		||||
            cmd: podman-compose up -d
 | 
			
		||||
            chdir: ~/dev/sukaato-compose
 | 
			
		||||
          register: podup
 | 
			
		||||
          changed_when: podup.rc != 0
 | 
			
		||||
          register: podsup
 | 
			
		||||
          changed_when: podsup.rc != 0
 | 
			
		||||
      rescue:
 | 
			
		||||
        - name: Ensure existence of Caddy data container volume
 | 
			
		||||
          containers.podman.podman_volume:
 | 
			
		||||
@@ -57,6 +57,10 @@
 | 
			
		||||
          containers.podman.podman_volume:
 | 
			
		||||
            state: present
 | 
			
		||||
            name: caddy_config
 | 
			
		||||
        - name: Ensure existence of Gitea data container volume
 | 
			
		||||
          containers.podman.podman_volume:
 | 
			
		||||
            state: present
 | 
			
		||||
            name: gitea_data
 | 
			
		||||
        - name: Ensure existence of directory for Caddyfile root path # @TODO: Specify ownership
 | 
			
		||||
          ansible.builtin.file:
 | 
			
		||||
            path: /srv/www/sukaato.moe
 | 
			
		||||
@@ -76,18 +80,21 @@
 | 
			
		||||
        - name: Ensure possession of Caddy container image
 | 
			
		||||
          containers.podman.podman_image:
 | 
			
		||||
            name: caddy
 | 
			
		||||
            tag: 2.9.1-alpine
 | 
			
		||||
            tag: latest
 | 
			
		||||
        - name: Ensure possession of Nextcloud container image
 | 
			
		||||
          containers.podman.podman_image:
 | 
			
		||||
            name: nextcloud
 | 
			
		||||
            tag: 31.0.0-fpm-alpine
 | 
			
		||||
            name: nextcloud/all-in-one
 | 
			
		||||
            tag: latest
 | 
			
		||||
        - name: Ensure possession of Gitea container image
 | 
			
		||||
          containers.podman.podman_image:
 | 
			
		||||
            name: gitea
 | 
			
		||||
            tag: 1.23.5
 | 
			
		||||
            name: gitea/gitea
 | 
			
		||||
            tag: 1.23-rootless
 | 
			
		||||
        - name: Ensure existence of shared network for Caddy reverse proxying
 | 
			
		||||
          containers.podman.podman_network:
 | 
			
		||||
            name: caddynet
 | 
			
		||||
        - name: Ensure existence of shared network for Nextcloud, Gitea et al
 | 
			
		||||
          containers.podman.podman_network:
 | 
			
		||||
            name: sharenet
 | 
			
		||||
        - name: Ensure containers are running with appropriate configuration
 | 
			
		||||
          containers.podman.podman_containers:
 | 
			
		||||
            containers:
 | 
			
		||||
@@ -111,15 +118,50 @@
 | 
			
		||||
                  stop_timeout: 120
 | 
			
		||||
                  names: true
 | 
			
		||||
                  container_prefix: pm@
 | 
			
		||||
              - name: cloud # @TODO: fill out rest of needed attributes
 | 
			
		||||
              - name: nextcloud-aio-mastercontainer # @TODO: fill out rest of needed attributes
 | 
			
		||||
                state: present # @TODO: Change to "started" later on
 | 
			
		||||
                restart_policy: on-failure:5
 | 
			
		||||
                image: nextcloud
 | 
			
		||||
                image: nextcloud/all-in-one
 | 
			
		||||
                init: true
 | 
			
		||||
                sig_proxy: false
 | 
			
		||||
                publish:
 | 
			
		||||
                  - "8080:8080"
 | 
			
		||||
                volumes:
 | 
			
		||||
                  - "~/.config/nextcloud:/mnt/docker-aio-config"
 | 
			
		||||
                  - "/var/run/docker.sock:/var/run/docker.sock:ro"
 | 
			
		||||
                network:
 | 
			
		||||
                  - "caddynet"
 | 
			
		||||
              - name: http_git # @TODO: fill out rest of needed attributes
 | 
			
		||||
                  - "sharenet"
 | 
			
		||||
                env:
 | 
			
		||||
                  APACHE_PORT: 11000
 | 
			
		||||
                  APACHE_IP_BINDING: 0.0.0.0
 | 
			
		||||
                  SKIP_DOMAIN_VALIDATION: false
 | 
			
		||||
                  NEXTCLOUD_DATADIR: "/mnt/datadrive/nextcloud" # @TODO: mount a ZFS-formatted volume/dataset on parent directory
 | 
			
		||||
                generate_systemd:
 | 
			
		||||
                  restart_policy: always
 | 
			
		||||
                  stop_timeout: 120
 | 
			
		||||
                  names: true
 | 
			
		||||
                  container_prefix: pm@
 | 
			
		||||
              # @NOTE: Below container has internal ports 3000 (web UI & HTTPS git) and 2222 (SSH git)
 | 
			
		||||
              - name: http_git # @TODO: Fill out rest of needed attributes
 | 
			
		||||
                state: present # @TODO: Change to "started" later on
 | 
			
		||||
                restart_policy: on-failure:5
 | 
			
		||||
                image: gitea
 | 
			
		||||
                image: gitea/gitea
 | 
			
		||||
                volumes:
 | 
			
		||||
                  - "~/.config/gitea:/etc/gitea"
 | 
			
		||||
                  - "gitea_data:/var/lib/gitea"
 | 
			
		||||
                  - /etc/timezone:/etc/timezone:ro
 | 
			
		||||
                  - /etc/localtime:/etc/localtime:ro
 | 
			
		||||
                network:
 | 
			
		||||
                  - "caddynet"
 | 
			
		||||
                  - "sharenet"
 | 
			
		||||
                requires:
 | 
			
		||||
                  - "db"
 | 
			
		||||
              # @TODO: Finish writing up the below
 | 
			
		||||
              - name: db
 | 
			
		||||
                state: present
 | 
			
		||||
                restart_policy: on-failure:5
 | 
			
		||||
                image: postgres
 | 
			
		||||
                network:
 | 
			
		||||
                  - "caddynet"
 | 
			
		||||
                  - "sharenet"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user