diff --git a/flatcar/app/Makefile b/flatcar/app/Makefile index 66f67a7..85ca201 100644 --- a/flatcar/app/Makefile +++ b/flatcar/app/Makefile @@ -1,2 +1,2 @@ run: - sudo docker-compose up + sudo docker-compose -f docker-compose.yaml $(find . -mindepth 2 -maxdepth 2 -type f -name docker-compose.yaml -exec echo -f {} \;) up diff --git a/flatcar/app/docker-compose.yaml b/flatcar/app/docker-compose.yaml index 50903b1..20824bb 100644 --- a/flatcar/app/docker-compose.yaml +++ b/flatcar/app/docker-compose.yaml @@ -3,8 +3,8 @@ services: lb: image: docker.io/caddy:2 volumes: - - /app/lb:/etc/caddy -# - ./lb/:/etc/caddy +# - /app/lb:/etc/caddy + - ./lb/:/etc/caddy - config:/config - data:/data networks: diff --git a/flatcar/app/lb/Caddyfile b/flatcar/app/lb/Caddyfile index a7a0a83..60f2e03 100644 --- a/flatcar/app/lb/Caddyfile +++ b/flatcar/app/lb/Caddyfile @@ -1,4 +1,4 @@ -wg-easy.nassella.cc { +wg-easy1.nassella.cc { reverse_proxy http://wg-easy:80 # tls internal @@ -6,6 +6,12 @@ wg-easy.nassella.cc { # log } -nassella.cc { +nextcloud1.nassella.cc { + reverse_proxy http://nextcloud:80 + # tls internal +} + +root.nassella.cc { reverse_proxy http://nginx:80 + # tls internal } \ No newline at end of file diff --git a/flatcar/app/nextcloud/docker-compose.yaml b/flatcar/app/nextcloud/docker-compose.yaml new file mode 100644 index 0000000..1e7ab7a --- /dev/null +++ b/flatcar/app/nextcloud/docker-compose.yaml @@ -0,0 +1,50 @@ +version: '3' + +services: + db: + image: postgres + shm_size: 128mb + restart: always + volumes: + - db:/var/lib/postgresql/data + environment: + - POSTGRES_DB=nextcloud + - POSTGRES_USER=nextcloud + - POSTGRES_PASSWORD=password + networks: + - internal + redis: + image: redis:alpine + restart: always + networks: + - internal + nextcloud: + image: nextcloud + environment: + - POSTGRES_HOST=db + - POSTGRES_DB=nextcloud + - POSTGRES_USER=nextcloud + - POSTGRES_PASSWORD=password + - NEXTCLOUD_ADMIN_PASSWORD=password + - NEXTCLOUD_ADMIN_USER=admin + - REDIS_HOST=redis + - NEXTCLOUD_TRUSTED_DOMAINS=nextcloud1.nassella.cc + ports: + - "8080:80" + depends_on: + - redis + - db + networks: + - lb + - internal + volumes: + - nextcloud:/var/www + restart: unless-stopped +networks: + lb: + internal: + driver: bridge + internal: true +volumes: + db: + nextcloud: diff --git a/flatcar/cl.yaml b/flatcar/cl.yaml index d2ad17c..b8853e2 100644 --- a/flatcar/cl.yaml +++ b/flatcar/cl.yaml @@ -41,13 +41,14 @@ systemd: ExecStartPost=/usr/bin/sh -c "readlink --canonicalize /etc/extensions/docker-compose.raw > /tmp/docker-compose-new" ExecStartPost=/usr/bin/sh -c "if ! cmp --silent /tmp/docker-compose /tmp/docker-compose-new; then touch /run/reboot-required; fi" +# device: /dev/disk/by-label/appstorage storage: disks: - - device: /dev/disk/by-label/appstorage + - device: /dev/sda wipe_table: false partitions: - label: appstorage - number: 0 + number: 1 filesystems: - device: /dev/disk/by-partlabel/appstorage format: ext4 diff --git a/main.tf b/main.tf index 8604c16..c9af97e 100644 --- a/main.tf +++ b/main.tf @@ -124,7 +124,7 @@ resource "cloudflare_dns_record" "subdomains" { resource "digitalocean_volume" "machine" { region = var.datacenter name = "${var.cluster_name}" - size = 30 + size = 60 initial_filesystem_type = "ext4" initial_filesystem_label = "appstorage" description = "persistent storage for docker apps"