diff --git a/tasks/certificates_certbot.yml b/tasks/certificates_certbot.yml index 931bdcb..e6cf3f8 100644 --- a/tasks/certificates_certbot.yml +++ b/tasks/certificates_certbot.yml @@ -1,14 +1,14 @@ - name: Create certbot certs copy: remote_src: true - src: "/etc/letsencrypt/live/nextcloud.equilibrateit.com/privkey.pem" + src: "/etc/letsencrypt/live/nextcloud.equilibrateit.test/privkey.pem" dest: "/home/nextcloud/nginx/certs/{{ inventory_hostname }}.key" owner: 100999 group: 100999 - copy: remote_src: true - src: "/etc/letsencrypt/live/nextcloud.equilibrateit.com/fullchain.pem" + src: "/etc/letsencrypt/live/nextcloud.equilibrateit.test/fullchain.pem" dest: "/home/nextcloud/nginx/certs/{{ inventory_hostname }}.crt" owner: 100999 group: 100999 diff --git a/tasks/files.yml b/tasks/files.yml index 71d209a..02aba7d 100644 --- a/tasks/files.yml +++ b/tasks/files.yml @@ -22,4 +22,4 @@ - name: Create Compose File template: src: "docker-compose.yml.j2" - dest: "/home/{{ user.name }}/" + dest: "/home/{{ user.name }}/docker-compose.yml" diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index eb7bdf2..8ae9008 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -2,22 +2,32 @@ version: '3.6' services: - step: - image: smallstep/step-ca:latest - environment: - DOCKER_STEPCA_INIT_NAME: "test-eqit" - DOCKER_STEPCA_INIT_DNS_NAMES: "test-eqit.lan" - DOCKER_STEPCA_INIT_ACME: "true" - DOCKER_STEPCA_INIT_REMOTE_MANAGEMENT: "false" - DOCKER_STEPCA_INIT_PASSWORD_FILE: "/home/step/.stepca.secret" + nextcloud: + image: nextcloud:stable-fpm + restart: always + ports: + - 9000:9000 + env: + - VIRTUAL_PROTO: "http" + - VIRTUAL_HOST: "{{ inventory_hostname | default('ansible_undefined_fact') }}" + - LETSENCRYPT_HOST: "{{ inventory_hostname | default('ansible_undefined_fact') }}" networks: default: aliases: - "test-eqit.lan" volumes: - - ~/stepca/data:/home/step - restart: always -# env_file: ".env" + - ~/webroot:/var/www/html -#volumes: -# acme: + nginx-proxy: + restart: unless-stopped + ports: + - 8080:8080 + - 8443:8443 + image: nginxproxy/nginx-proxy:1.9-alpine + environment: + HTTP_PORT: 8080 + HTTPS_PORT: 8443 + volumes: + - /run/user/1000/podman/podman.sock:/tmp/docker.sock:ro + - /home/nextcloud/nginx/certs:/etc/nginx/certs + - /home/nextcloud/nginx/challenges:/usr/share/nginx/html