diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/.github/workflows/deploy-to-gae.yaml b/.github/workflows/deploy-to-gae.yaml deleted file mode 100644 index 599765f..0000000 --- a/.github/workflows/deploy-to-gae.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Deploy to GAE -on: - push: - branches: - - master -permissions: - contents: 'read' - id-token: 'write' -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v2 - - id: auth - uses: google-github-actions/auth@v1 - with: - workload_identity_provider: projects/769700566231/locations/global/workloadIdentityPools/gh-actions-pool/providers/github - service_account: github-deploy@fhir-org-cds-services.iam.gserviceaccount.com - - id: deploy - uses: google-github-actions/deploy-appengine@v1 - with: - flags: "--stop-previous-version --promote" diff --git a/.github/workflows/deploy-to-gcloudrun.yaml b/.github/workflows/deploy-to-gcloudrun.yaml new file mode 100644 index 0000000..53f1840 --- /dev/null +++ b/.github/workflows/deploy-to-gcloudrun.yaml @@ -0,0 +1,32 @@ +name: Deploy to GAE +on: + push: + branches: + - master +permissions: + contents: 'read' + id-token: 'write' +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v2 + - id: auth + uses: google-github-actions/auth@v1 + with: + workload_identity_provider: projects/769700566231/locations/global/workloadIdentityPools/gh-actions-pool/providers/github + service_account: github-deploy@fhir-org-cds-services.iam.gserviceaccount.com + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v1 + with: + version: '>= 363.0.0' + - name: Build and Deploy + run: | + gcloud auth configure-docker us-east1-docker.pkg.dev --quiet + docker build --tag us-east1-docker.pkg.dev/fhir-org-cds-services/sandbox-cds-services/server:latest . + docker push us-east1-docker.pkg.dev/fhir-org-cds-services/sandbox-cds-services/server:latest + gcloud run deploy sandbox-cds-services \ + --image=us-east1-docker.pkg.dev/fhir-org-cds-services/sandbox-cds-services/server:latest \ + --region=us-central1 \ + --project=fhir-org-cds-services diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1f499f4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:18 +WORKDIR /usr/src/app +COPY package*.json ./ +RUN npm ci +COPY . . +EXPOSE 8080 +CMD [ "node", "server.js" ] diff --git a/app.yaml b/app.yaml deleted file mode 100644 index 40bc5fb..0000000 --- a/app.yaml +++ /dev/null @@ -1,12 +0,0 @@ -runtime: nodejs -env: flex -runtime_config: - operating_system: "ubuntu22" - runtime_version: "20" -manual_scaling: - instances: 1 -resources: - cpu: 1 - memory_gb: 0.5 - disk_size_gb: 10 -