Skip to content

Commit ee7150e

Browse files
committed
Build dev properly
1 parent e470b01 commit ee7150e

3 files changed

Lines changed: 10 additions & 90 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ on:
55
branches: [development, master, azure]
66

77
env:
8-
#CURRENT_ENV: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
9-
CURRENT_ENV: production
8+
CURRENT_ENV: development
9+
# CURRENT_ENV: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
1010

1111
jobs:
1212
build:
13-
environment: production
13+
environment: development
14+
#environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'development' }}
1415
name: Build and Deploy
1516
runs-on: ubuntu-latest
1617
steps:
@@ -33,7 +34,7 @@ jobs:
3334
run: |
3435
echo $SERVICE_ACCOUNT_KEY | base64 --decode > serviceAccountKey.json
3536
echo $ENV_FILE | base64 --decode > .env
36-
docker build --target production -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.sha }} .
37+
docker build --target ${{ env.CURRENT_ENV }} -t $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.sha }} .
3738
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.sha }}
3839
3940
- name: Deploy to Azure App Service

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ WORKDIR /usr/src/app
55

66
COPY package*.json ./
77

8-
RUN npm ci
8+
RUN npm i
99

1010
COPY . .
1111

12+
EXPOSE 3000
13+
14+
CMD ["npm", "run", "start:dev"]
15+
1216
# Production (multi-stage build)
1317
FROM node:16-alpine AS build
1418

azure/containers.tf

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)