diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 736591b..ca9517d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -43,6 +43,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Zip deployment package + run: | + zip -r deployment_package.zip . -x ".git/*" "frontend/node_modules/*" "backend/node_modules/*" + - name: Deploy to Elastic Beanstalk uses: einaregilsson/beanstalk-deploy@v21 with: @@ -53,4 +57,4 @@ jobs: region: ${{ secrets.EB_REGION }} version_label: "version-${{ github.run_number }}" #OR use_existing_version_if_available: true - deployment_package: docker-compose.yml + deployment_package: deployment_package.zip diff --git a/backend/Dockerfile b/backend/Dockerfile index 41c96f6..c7536ed 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,6 @@ FROM node:latest WORKDIR /app -COPY package.json ./ -# COPY package*.json ./ +COPY package*.json ./ RUN npm install COPY . . EXPOSE 3000 diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 8d6e16a..3a9e902 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,7 +1,6 @@ FROM node:latest as build WORKDIR /app -# COPY package*.json ./ -COPY package.json ./ +COPY package*.json ./ RUN npm install COPY . .