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.
- Loading branch information
1 parent
1d4a920
commit 379e522
Showing
12 changed files
with
21,208 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/.eslintrc
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,8 @@ | ||
{ | ||
"extends": [ | ||
"important-stuff", | ||
"plugin:prettier/recommended" | ||
], | ||
"parser": "@babel/eslint-parser", | ||
"requireConfigFile": false | ||
} |
8 changes: 8 additions & 0 deletions
8
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/.prettierignore
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,8 @@ | ||
.gitignore | ||
.prettierignore | ||
yarn.lock | ||
yarn-error.log | ||
package-lock.json | ||
dist | ||
coverage | ||
pnpm-lock.yaml |
48 changes: 48 additions & 0 deletions
48
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/Dockerfile
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,48 @@ | ||
# base image | ||
FROM node:16.20.1-alpine as build-stage | ||
|
||
# set working directory | ||
WORKDIR /forms-flow-theme/app | ||
|
||
|
||
# add `/app/node_modules/.bin` to $PATH | ||
ENV PATH /forms-flow-theme/app/node_modules/.bin:$PATH | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash git openssh | ||
|
||
# install and cache app dependencies | ||
|
||
RUN git clone https://github.com/AOT-Technologies/forms-flow-ai-micro-front-ends.git /tmp/forms-flow-ai/ | ||
RUN cp -r /tmp/forms-flow-ai/forms-flow-theme/. /forms-flow-theme/app | ||
|
||
COPY package-lock.json /forms-flow-theme/app/package-lock.json | ||
COPY package.json /forms-flow-theme/app/package.json | ||
|
||
RUN npm install | ||
|
||
COPY . /forms-flow-theme/app/ | ||
|
||
ARG CUSTOM_SRC_DIR=src | ||
COPY ./ /tmp/${CUSTOM_SRC_DIR}/ | ||
RUN cp -R /tmp/${CUSTOM_SRC_DIR}/* /forms-flow-theme/app/ && rm -Rf /tmp/${CUSTOM_SRC_DIR} | ||
RUN ls | ||
|
||
RUN npm run build:webpack | ||
|
||
|
||
FROM nginx:1.15.2-alpine as production-stage | ||
|
||
# set label for image | ||
LABEL Name="formsflow" | ||
|
||
RUN mkdir /app | ||
COPY --from=build-stage /forms-flow-theme/app/dist /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
EXPOSE 3008:8080 | ||
WORKDIR /usr/share/nginx/html/config | ||
# COPY .env . | ||
RUN apk add --no-cache bash | ||
|
||
|
||
CMD ["nginx", "-g", "daemon off;"] |
23 changes: 23 additions & 0 deletions
23
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/babel.config.json
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,23 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
], | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-transform-runtime", | ||
{ | ||
"useESModules": true, | ||
"regenerator": false | ||
} | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": "current node" | ||
}] | ||
] | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/docker-compose.yaml
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,9 @@ | ||
services: | ||
forms-flow-theme: | ||
container_name: forms-flow-theme | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "3008:8080" | ||
tty: true |
9 changes: 9 additions & 0 deletions
9
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/jest.config.js
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,9 @@ | ||
module.exports = { | ||
testEnvironment: "jsdom", | ||
transform: { | ||
"^.+\\.(j|t)sx?$": "babel-jest", | ||
}, | ||
moduleNameMapper: { | ||
"\\.(css)$": "identity-obj-proxy", | ||
}, | ||
}; |
63 changes: 63 additions & 0 deletions
63
forms-flow-ai/forms-flow-ai-micro-front-ends/forms-flow-theme/nginx.conf
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,63 @@ | ||
# nginx.conf | ||
worker_processes auto; | ||
error_log /var/log/nginx/error.log; | ||
|
||
pid /tmp/nginx.pid; | ||
|
||
|
||
events { | ||
worker_connections 4096; | ||
} | ||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
client_body_temp_path /tmp/client_temp; | ||
proxy_temp_path /tmp/proxy_temp_path; | ||
fastcgi_temp_path /tmp/fastcgi_temp; | ||
uwsgi_temp_path /tmp/uwsgi_temp; | ||
scgi_temp_path /tmp/scgi_temp; | ||
default_type application/octet-stream; | ||
server_tokens off; | ||
underscores_in_headers on; | ||
|
||
# Use a w3c standard log format | ||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
|
||
|
||
server { | ||
|
||
# add in most common security headers | ||
add_header Content-Security-Policy "default-src * data: blob: filesystem: 'unsafe-inline' 'unsafe-eval'"; | ||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; | ||
add_header X-Content-Type-Options "nosniff"; | ||
add_header X-XSS-Protection 1; | ||
add_header X-Frame-Options SAMEORIGIN; | ||
|
||
|
||
|
||
listen 8080; | ||
server_name _; | ||
|
||
index index.html; | ||
error_log /dev/stdout info; | ||
access_log /dev/stdout; | ||
|
||
location / { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
|
||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
} |
Oops, something went wrong.