Skip to content

Commit

Permalink
Modified Dockerfile scripts (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
githubmamatha authored Jul 22, 2024
1 parent 853b1c9 commit 220c4b3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/modified-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
# Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build
# Otherwise, point this to your Dockerfile/Containerfile relative to the repository root.
dockerfiles: |
./backend/Dockerfile
./backend/Dockerfile1
context: ./backend

# https://github.com/redhat-actions/push-to-registry#readme
Expand All @@ -157,7 +157,7 @@ jobs:
# Or, perform a source-to-image build using https://github.com/redhat-actions/s2i-build
# Otherwise, point this to your Dockerfile/Containerfile relative to the repository root.
dockerfiles: |
./frontend/Dockerfile
./frontend/Dockerfile1
context: ./frontend

# https://github.com/redhat-actions/push-to-registry#readme
Expand Down
14 changes: 14 additions & 0 deletions backend/Dockerfile1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM artifacts.developer.gov.bc.ca/docker-remote/node:18.16.0-alpine3.18

RUN mkdir -p /logs
RUN chmod 755 /logs

WORKDIR /opt/app-root/src
RUN ln -s /logs .

COPY package*.json ./
RUN npm ci

COPY . /opt/app-root/src
EXPOSE 443 8080
CMD ["node", "--max-old-space-size=150", "./src/server.js"]
4 changes: 2 additions & 2 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "edx-backend",
"name": "iosas-backend",
"version": "0.0.1",
"description": "The backend portion of the EDX web app",
"description": "The backend portion of the IOSAS web app",
"scripts": {
"serve": "npm run setlocal && npm run servecmd",
"serve-linux": "export NODE_ENV='local' && nodemon ./src/server.js",
Expand Down Expand Up @@ -165,9 +165,9 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/bcgov/EDUC-EDX.git"
"url": "git+https://github.com/bcgov/ECC-IOSAS.git"
},
"bugs": {
"url": "https://github.com/bcgov/EDUC-EDX/issues"
"url": "https://github.com/bcgov/ECC-IOSAS/issues"
}
}
12 changes: 12 additions & 0 deletions frontend/Dockerfile1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM artifacts.developer.gov.bc.ca/docker-remote/node:14.20.1 as build-stage
WORKDIR /frontend
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build

FROM artifacts.developer.gov.bc.ca/docker-remote/caddy:2.4.6-alpine as caddy-stage

EXPOSE 2015
COPY Caddyfile /etc/caddy/Caddyfile
COPY --from=build-stage /frontend/dist /srv
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "edx",
"name": "iosas",
"version": "1.0.0",
"private": true,
"description": "IOSAS Independent School Portal",
Expand Down

0 comments on commit 220c4b3

Please sign in to comment.