From 905691f4bbed9f9d20844b91256944495eb10ebb Mon Sep 17 00:00:00 2001 From: Thord Johansson Date: Wed, 20 Mar 2024 11:25:56 +0100 Subject: [PATCH] Added kopia, nginx, portainer --- kopia/docker-compose.yml | 59 ++++++++++++++++++++++++++++++++++++ nginx/docker-compose.yml | 21 +++++++++++++ portainer/docker-compose.yml | 14 +++++++++ 3 files changed, 94 insertions(+) create mode 100644 kopia/docker-compose.yml create mode 100644 nginx/docker-compose.yml create mode 100644 portainer/docker-compose.yml diff --git a/kopia/docker-compose.yml b/kopia/docker-compose.yml new file mode 100644 index 0000000..883e352 --- /dev/null +++ b/kopia/docker-compose.yml @@ -0,0 +1,59 @@ +version: '3.7' + +# on naspi for remote docker stop commands: +# sudo visudo +# thord ALL=(ALL) NOPASSWD: /bin/systemctl start docker, /bin/systemctl stop docker + +services: + kopia: + image: kopia/kopia:latest + hostname: kopia-host + container_name: kopia + restart: unless-stopped + networks: + vlan: + ipv4_address: 192.168.1.102 + ports: + - 51515:51515 + command: + - server + - start + - --disable-csrf-token-checks + - --insecure + - --address=0.0.0.0:51515 + - --server-username=${KOPIA_USER_NAME} + - --server-password=${KOPIA_USER_PASSWORD} + environment: + # Set repository password + KOPIA_PASSWORD: "${KOPIA_PASSWORD}" + USER: "User" + volumes: + # Mount local folders needed by kopia + - /opt/kopia/config:/app/config + - /opt/kopia/cache:/app/cache + - /opt/kopia/logs:/app/logs + # Use NFS volume for storage + - nfs-naspi:/data/naspi:ro + # Mount repository location locally + - /opt/kopia/repository:/repository + # Mount path for browsing mounted snapshots + - /tmp:/tmp:shared + - /home/thord/.config/rclone:/app/rclone + - /usr/bin/rclone:/app/rclone-bin + +volumes: + nfs-naspi: + driver: local + driver_opts: + type: nfs + o: addr=${NFS_SERVER_IP},ro,nolock + device: ":/mnt/data" +networks: + vlan: + driver: macvlan + driver_opts: + parent: eno1 # Adjust the parent interface based on your host configuration + ipam: + config: + - subnet: 192.168.1.0/24 + gateway: 192.168.1.1 # Adjust the gateway based on your network configuration diff --git a/nginx/docker-compose.yml b/nginx/docker-compose.yml new file mode 100644 index 0000000..96aa228 --- /dev/null +++ b/nginx/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3.9' + +services: + web: + container_name: nginx-server + image: nginx:latest + ports: + - '80:80' + - '443:443' + volumes: + - ./src:/var/www/html + - ./src/minecraft/mods:/home/thord/minecraft/mods + - ./default.conf:/etc/nginx/conf.d/default.conf + links: + - php-fpm + + php-fpm: + container_name: nginx-php-fpm + image: php:8-fpm + volumes: + - ./src:/var/www/html diff --git a/portainer/docker-compose.yml b/portainer/docker-compose.yml new file mode 100644 index 0000000..1322b65 --- /dev/null +++ b/portainer/docker-compose.yml @@ -0,0 +1,14 @@ +services: + portainer: + image: portainer/portainer-ce:latest + container_name: portainer + restart: always + ports: + - "8000:8000" + - "9443:9443" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - portainer_data:/data + +volumes: + portainer_data: