-
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 #142 from dictyBase/refactor/upgrade-slate
Refactor/upgrade slate
- Loading branch information
Showing
36 changed files
with
3,668 additions
and
2,479 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# It's a multi stage build https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage | ||
# The first one build single file js for the web app | ||
# The second one copies the file and server with a golang static web server | ||
FROM node:10.4.0-alpine | ||
LABEL maintainer "Eric Hartline <[email protected]>" | ||
|
||
# include git, otherwise npm install doesn't work | ||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash git openssh jq | ||
|
||
# URL for api server | ||
ARG api_server | ||
ENV REACT_APP_API_SERVER ${api_server:-https://ericapi.dictybase.dev} | ||
|
||
# URL for auth server | ||
ARG auth_server | ||
ENV REACT_APP_AUTH_SERVER ${auth_server:-https://erictoken.dictybase.dev} | ||
|
||
# URL for navbar json | ||
ARG navbar_json | ||
ENV REACT_APP_NAVBAR_JSON ${navbar_json:-https://raw.githubusercontent.com/dictyBase/migration-data/master/navbar/navbar.json} | ||
|
||
# URL for footer json | ||
ARG footer_json | ||
ENV REACT_APP_FOOTER_JSON ${footer_json:-https://raw.githubusercontent.com/dictyBase/migration-data/master/footer/footer.json} | ||
|
||
# URL for download tabs json | ||
ARG download_tabs_json | ||
ENV REACT_APP_DOWNLOAD_TABS_JSON ${download_tabs_json:-https://raw.githubusercontent.com/dictyBase/migration-data/master/downloads/organisms.dev.json} | ||
|
||
# Setup client keys for third party auth | ||
ARG client_keys | ||
ENV CLIENT_KEYS ${client_keys:-https://raw.githubusercontent.com/dictybase-playground/client-keys/2.0.0/clientConfig.eric.js} | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# copy only necessary files | ||
COPY package-lock.json jsconfig.json ./ | ||
|
||
# package.json have to be modified later on, so | ||
ADD package.json ./ | ||
|
||
# add necessary folders | ||
ADD src src | ||
ADD public public | ||
|
||
# overwrite the client key file | ||
ADD $CLIENT_KEYS /usr/src/app/src/utils/clientConfig.js | ||
|
||
# standard install/build commands | ||
RUN npm install && npm run build | ||
|
||
FROM dictybase/static-server:2.0.0 | ||
RUN mkdir /www | ||
WORKDIR /www | ||
COPY --from=0 /usr/src/app/build ./ | ||
ENTRYPOINT ["/usr/local/bin/app", "run", "-f", "/www"] |
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,59 @@ | ||
# It's a multi stage build https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage | ||
# The first one build single file js for the web app | ||
# The second one copies the file and server with a golang static web server | ||
FROM node:10.4.0-alpine | ||
LABEL maintainer "Siddhartha Basu <[email protected]>" | ||
|
||
# include git, otherwise npm install doesn't work | ||
RUN apk update && apk upgrade && \ | ||
apk add --no-cache bash git openssh jq | ||
|
||
# URL for api server | ||
ARG api_server | ||
ENV REACT_APP_API_SERVER ${api_server:-https://siddapi.dictybase.dev} | ||
|
||
# URL for auth server | ||
ARG auth_server | ||
ENV REACT_APP_AUTH_SERVER ${auth_server:-https://siddtoken.dictybase.dev} | ||
|
||
# URL for navbar json | ||
ARG navbar_json | ||
ENV REACT_APP_NAVBAR_JSON ${navbar_json:-https://raw.githubusercontent.com/dictyBase/migration-data/master/navbar/navbar.json} | ||
|
||
# URL for footer json | ||
ARG footer_json | ||
ENV REACT_APP_FOOTER_JSON ${footer_json:-https://raw.githubusercontent.com/dictyBase/migration-data/master/footer/footer.json} | ||
|
||
# URL for download tabs json | ||
ARG download_tabs_json | ||
ENV REACT_APP_DOWNLOAD_TABS_JSON ${download_tabs_json:-https://raw.githubusercontent.com/dictyBase/migration-data/master/downloads/organisms.dev.json} | ||
|
||
# Setup client keys for third party auth | ||
ARG client_keys | ||
ENV CLIENT_KEYS ${client_keys:-https://raw.githubusercontent.com/dictybase-playground/client-keys/2.0.0/clientConfig.js} | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# copy only necessary files | ||
COPY package-lock.json jsconfig.json ./ | ||
|
||
# package.json have to be modified later on, so | ||
ADD package.json ./ | ||
|
||
# add necessary folders | ||
ADD src src | ||
ADD public public | ||
|
||
# overwrite the client key file | ||
ADD $CLIENT_KEYS /usr/src/app/src/utils/clientConfig.js | ||
|
||
# standard install/build commands | ||
RUN npm install && npm run build | ||
|
||
FROM dictybase/static-server:2.0.0 | ||
RUN mkdir /www | ||
WORKDIR /www | ||
COPY --from=0 /usr/src/app/build ./ | ||
ENTRYPOINT ["/usr/local/bin/app", "run", "-f", "/www"] |
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,116 @@ | ||
// flow-typed signature: 1f6a58312740313d2805cbd71742187a | ||
// flow-typed version: <<STUB>>/@convertkit/slate-lists_vx.x.x/flow_v0.80.0 | ||
|
||
/** | ||
* This is an autogenerated libdef stub for: | ||
* | ||
* '@convertkit/slate-lists' | ||
* | ||
* Fill this stub out by replacing all the `any` types. | ||
* | ||
* Once filled out, we encourage you to share your work with the | ||
* community by sending a pull request to: | ||
* https://github.com/flowtype/flow-typed | ||
*/ | ||
|
||
declare module '@convertkit/slate-lists' { | ||
declare module.exports: any; | ||
} | ||
|
||
/** | ||
* We include stubs for each file inside this npm package in case you need to | ||
* require those files directly. Feel free to delete any files that aren't | ||
* needed. | ||
*/ | ||
declare module '@convertkit/slate-lists/dist/index.esm' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/dist/index' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/commands/decrease-list-item-depth' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/commands/increase-list-item-depth' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/commands/toggle-list' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/commands/unwrap-list-by-key' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/commands/unwrap-list' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/commands/wrap-list' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/create-commands' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/create-normalize-node' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/create-render-node' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/create-schema' { | ||
declare module.exports: any; | ||
} | ||
|
||
declare module '@convertkit/slate-lists/src/index' { | ||
declare module.exports: any; | ||
} | ||
|
||
// Filename aliases | ||
declare module '@convertkit/slate-lists/dist/index.esm.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/dist/index.esm'>; | ||
} | ||
declare module '@convertkit/slate-lists/dist/index.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/dist/index'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/commands/decrease-list-item-depth.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/commands/decrease-list-item-depth'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/commands/increase-list-item-depth.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/commands/increase-list-item-depth'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/commands/toggle-list.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/commands/toggle-list'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/commands/unwrap-list-by-key.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/commands/unwrap-list-by-key'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/commands/unwrap-list.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/commands/unwrap-list'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/commands/wrap-list.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/commands/wrap-list'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/create-commands.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/create-commands'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/create-normalize-node.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/create-normalize-node'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/create-render-node.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/create-render-node'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/create-schema.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/create-schema'>; | ||
} | ||
declare module '@convertkit/slate-lists/src/index.js' { | ||
declare module.exports: $Exports<'@convertkit/slate-lists/src/index'>; | ||
} |
Oops, something went wrong.