File tree Expand file tree Collapse file tree 5 files changed +33
-25
lines changed
Expand file tree Collapse file tree 5 files changed +33
-25
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release Docker Image
2+
3+ on :
4+ release :
5+ types :
6+ published
7+
8+ jobs :
9+ build_and_publish :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ packages : write
13+ steps :
14+ - uses : actions/checkout@v3
15+ - name : Build and push Docker image
16+ run : |
17+ docker login --username blue-core-lod --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
18+ docker build . --tag ghcr.io/blue-core-lod/sinopia:latest
19+ docker push ghcr.io/blue-core-lod/sinopia:latest
Original file line number Diff line number Diff line change 1- FROM cimg/ node:16.8
1+ FROM node:16.8
22
33# Allow build-time arguments (for, environment variables that need to be encoded into the webpack distribution)
44ARG USE_FIXTURES
5- ARG SINOPIA_API_BASE_URL=http://localhost:3000
6- ARG SINOPIA_URI
7- ARG SINOPIA_ENV
8- ARG AWS_COGNITO_DOMAIN
9- ARG COGNITO_CLIENT_ID
10- ARG COGNITO_USER_POOL_ID
5+ ARG SINOPIA_API_BASE_URL=http://localhost/api
6+ ARG SINOPIA_URI=http://localhost/sinopia
7+ ARG SINOPIA_ENV=bluecore
118ARG INDEX_URL
129ARG EXPORT_BUCKET_URL
13- ARG HONEYBADGER_API_KEY
14- ARG HONEYBADGER_REVISION
15- ENV HONEYBADGER_API_KEY=$HONEYBADGER_API_KEY
1610
1711# Set environment variables from the build args
1812ENV INDEX_URL ${INDEX_URL}
1913
20- COPY --chown=circleci:circleci package.json .
21- COPY --chown=circleci:circleci package-lock.json .
14+ COPY package.json .
15+ COPY package-lock.json .
2216
2317# Install dependencies
2418RUN npm install --no-optional
2519
2620# Everything that isn't in .dockerignore ships
27- COPY --chown=circleci:circleci . .
21+ COPY . .
2822
2923# Build the app *within* the container because environment variables are fixed at build-time
3024RUN npm run build
3125
32- # Send source map to HB
33- RUN if [ -n "$HONEYBADGER_API_KEY" ]; then curl https://api.honeybadger.io/v1/source_maps \
34- -F api_key=$HONEYBADGER_API_KEY \
35- -F revision=$HONEYBADGER_REVISION \
36- -F minified_url=$SINOPIA_URI/dist/bundle.js \
37- -F source_map=@dist/bundle.js.map \
38- -F minified_file=@dist/bundle.js ; fi
39-
4026# docker daemon maps app's port
41- EXPOSE 8000
27+ EXPOSE 8004
4228
4329CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change @@ -11,9 +11,11 @@ import Config from "./src/Config"
1111import cors from "cors"
1212import proxy from "express-http-proxy"
1313
14- const port = 8000
14+ const port = 8004
1515const app = express ( )
1616
17+ app . set ( 'trust proxy' , true ) ;
18+
1719app . use ( express . urlencoded ( { extended : true } ) ) // handle URL-encoded data
1820
1921app . use ( cors ( ) )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { Provider } from "react-redux"
88import CanvasMenu from "./menu/CanvasMenu"
99import App from "./App"
1010import store from "../store"
11+ import Config from "../Config"
1112import { KeycloakProvider } from "../KeycloakContext"
1213import HoneybadgerNotifier from "Honeybadger"
1314import { HoneybadgerErrorBoundary } from "@honeybadger-io/react"
@@ -29,7 +30,7 @@ const RootContainer = () => {
2930 effect = { "overlay" }
3031 >
3132 < OffCanvasBody className = { offcanvasClass } >
32- < BrowserRouter >
33+ < BrowserRouter basename = "/sinopia" >
3334 < Provider store = { store } >
3435 < App
3536 isMenuOpened = { isMenuOpened }
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ module.exports = {
7070 } ,
7171 output : {
7272 path : path . join ( __dirname , "/dist" ) ,
73- publicPath : "/dist/" ,
73+ publicPath : "/sinopia/ dist/" ,
7474 filename : "bundle.js" ,
7575 } ,
7676 plugins : [
You can’t perform that action at this time.
0 commit comments