Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Maiykol committed Feb 7, 2024
2 parents 08efed2 + d8b3c52 commit 64a2002
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 21 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
with:
cosign-release: 'v1.13.1'
cosign-release: 'v2.1.1'


# Workaround: https://github.com/docker/build-push-action/issues/461
Expand Down Expand Up @@ -75,22 +75,10 @@ jobs:
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
file: ./docker/Dockerfile.${{ github.ref_name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max


# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
# repository is public to avoid leaking data. If you would like to publish
# transparency data even for private images, pass --force to cosign below.
# https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
COSIGN_EXPERIMENTAL: "true"
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN npm install

COPY . /app/

RUN cp -f /app/src/environments/environment.uhh.prod.ts /app/src/environments/environment.prod.ts
RUN cp -f /app/src/environments/environment.local.ts /app/src/environments/environment.ts

# RUN NODE_OPTIONS="--max-old-space-size=16384"

Expand Down
31 changes: 31 additions & 0 deletions Dockerfile.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM node:16.15.0

RUN apt-get update
RUN apt-get install -y curl

# RUN curl -sL https://deb.nodesource.com/setup_16.x | bash

RUN apt-get install -y nodejs

COPY package.json /app/
COPY package-lock.json /app/

WORKDIR /app/

RUN npm install

COPY . /app/

# environment.prod.ts will be used on server to provide backend url, however, staging requires dev url
RUN cp -f /app/src/environments/environment.development.ts /app/src/environments/environment.ts

# RUN NODE_OPTIONS="--max-old-space-size=16384"

RUN npm run build -- --prod --base-href=/caddie/ --output-path=./dist/caddie

RUN cp -r /app/dist/caddie/* /usr/share/nginx/html/

COPY nginx/default.conf /etc/nginx/conf.d/
COPY nginx/htpasswd /etc/nginx/htpasswd

EXPOSE 4200
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN npm install
COPY . /app/

# environment.prod.ts will be used on server to provide backend url, however, staging requires dev url
RUN cp -f /app/src/environments/environment.local.ts /app/src/environments/environment.prod.ts
RUN cp -f /app/src/environments/environment.development.ts /app/src/environments/environment.ts

# RUN NODE_OPTIONS="--max-old-space-size=16384"

Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.prod → Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ COPY . /app/

# RUN NODE_OPTIONS="--max-old-space-size=16384"

# environment.prod.ts will be used on server to provide backend url, however, staging requires dev url
RUN cp -f /app/src/environments/environment.production.ts /app/src/environments/environment.ts

RUN npm run build -- --prod --base-href=/caddie/ --output-path=/app/dist/caddie

FROM nginx:1.23.1-alpine
Expand Down
4 changes: 4 additions & 0 deletions src/environments/environment.development.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const environment = {
production: true,
backend: 'https://prototypes.cosy.bio/api-caddie_dev/',
};
4 changes: 0 additions & 4 deletions src/environments/environment.prod.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const environment = {
production: true,
backend: 'https://apps.cosy.bio/api-caddie/',
backend: 'https://cosy.bio/api-caddie/',
};

0 comments on commit 64a2002

Please sign in to comment.