From 98ac509ba81bc96fd8b21117f4bce65b295f8582 Mon Sep 17 00:00:00 2001 From: Aseer KT Date: Fri, 9 Aug 2024 11:29:44 +0530 Subject: [PATCH] fix: update caddy configuration --- .github/workflows/ec2-cd.yml | 2 +- infra/ec2/Caddyfile | 2 +- infra/ec2/docker-compose.prod.yml | 9 +-------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ec2-cd.yml b/.github/workflows/ec2-cd.yml index 4579bb2..42265c0 100644 --- a/.github/workflows/ec2-cd.yml +++ b/.github/workflows/ec2-cd.yml @@ -53,7 +53,7 @@ jobs: name: mchat_build - name: Move static files - run: mv web/dist /var/www/html + run: sudo mv web/dist /var/www/html - name: Restart application run: pm2 restart mchat diff --git a/infra/ec2/Caddyfile b/infra/ec2/Caddyfile index 0f6603c..d41f505 100644 --- a/infra/ec2/Caddyfile +++ b/infra/ec2/Caddyfile @@ -1,5 +1,5 @@ mchat.aseerkt.com { encode zstd gzip - file_server + file_server /dist/* reverse_proxy /api/* 127.0.0.1:5000 } diff --git a/infra/ec2/docker-compose.prod.yml b/infra/ec2/docker-compose.prod.yml index d0e98a1..f32299e 100644 --- a/infra/ec2/docker-compose.prod.yml +++ b/infra/ec2/docker-compose.prod.yml @@ -35,11 +35,4 @@ services: - '443:443' - '443:443/udp' volumes: - - $PWD/Caddyfile:/etc/caddy/Caddyfile - - caddy_data:/data - - caddy_config:/config - -volumes: - caddy_data: - external: true - caddy_config: + - ./Caddyfile:/etc/caddy/Caddyfile