diff --git a/.github/workflows/actions-ec2.yml b/.github/workflows/actions-ec2.yml index 3cf2500..3457548 100644 --- a/.github/workflows/actions-ec2.yml +++ b/.github/workflows/actions-ec2.yml @@ -37,3 +37,4 @@ jobs: sudo systemctl restart app-store-api npm run build sudo systemctl restart app-store-frontend + sudo chown -R www-data:www-data /tmp/app-store-frontend.sock diff --git a/scripts/app-store-frontend.service b/scripts/app-store-frontend.service index 91b41c0..315509a 100644 --- a/scripts/app-store-frontend.service +++ b/scripts/app-store-frontend.service @@ -8,13 +8,11 @@ After=network.target Type=simple User=ubuntu Group=ubuntu -WorkingDirectory=/home/ubuntu/app-store-dash/frontend +SupplementaryGroups=www-data Environment=NODE_ENV=production SOCKET_PATH=/tmp/app-store-frontend.sock ExecStart=/usr/local/bin/node /home/ubuntu/app-store-dash/frontend/build -ExecReload=/bin/kill -s HUP $MAINPID Restart=on-failure KillMode=mixed -PrivateTmp=true [Install] WantedBy=multi-user.target