generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from bcgov/ss-initforapps
Ss initforapps
- Loading branch information
Showing
7 changed files
with
159 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,7 +139,7 @@ jobs: | |
# if: inputs.component == 'backend/users-migration' | ||
# file: ./backend/users/Dockerfile-migrations-openshift | ||
|
||
- name: Build and push Migration image | ||
- name: Build and push Migration image for users | ||
if: steps.check.outputs.build == 'true' && inputs.component == 'backend/users' | ||
uses: docker/[email protected] | ||
with: | ||
|
@@ -149,4 +149,15 @@ jobs: | |
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
file: ./backend/users/Dockerfile-migrations-openshift | ||
|
||
- name: Build and push Migration image for applications | ||
if: steps.check.outputs.build == 'true' && inputs.component == 'backend/applications' | ||
uses: docker/[email protected] | ||
with: | ||
context: ./${{ inputs.component }}/ | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}/backend/applications-migration:${{ inputs.img_build }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
file: ./backend/applications/Dockerfile-migrations-openshift | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM node:14.5.0-alpine | ||
#FROM artifacts.developer.gov.bc.ca/docker-remote/node:14.17.1-alpine | ||
|
||
# Install packages, build and keep only prod packages | ||
WORKDIR /app | ||
|
||
# A wildcard is used to ensure both package.json AND package-lock.json are copied | ||
COPY package*.json ./ | ||
|
||
# Set NODE_ENV environment variable | ||
#ENV NODE_ENV production | ||
|
||
# Install app dependencies using the `npm ci` command instead of `npm install` | ||
RUN npm ci | ||
|
||
#RUN npm build | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
RUN set -x \ | ||
&& chmod -R 777 /app/ | ||
|
||
RUN apk add postgresql-client | ||
|
||
ENTRYPOINT [ "sh", "initDB.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# create DB dependencies - database, schema | ||
#sh initDB.sh | ||
|
||
# run type orm migrations | ||
#npm run typeorm:run-migrations | ||
|
||
# Creates a "dist" folder with the production build | ||
#npm run build | ||
|
||
# start the API | ||
npm run start:prod |