This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'breadcrumbs' of https://github.com/oliv37/hospitalrun-f…
…rontend into breadcrumbs
- Loading branch information
Showing
13 changed files
with
188 additions
and
114 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 |
---|---|---|
@@ -1 +1,19 @@ | ||
node_modules | ||
# Items that don't need to be in a Docker image. | ||
# Anything not used by the build system should go here. | ||
.gitignore | ||
*.md | ||
*.yml | ||
.git | ||
*.js | ||
azure | ||
.editorconfig | ||
.github | ||
.npmrc | ||
.nvmrc | ||
.prettierrc | ||
.replit | ||
.vscode | ||
LICENSE | ||
docs | ||
*.log | ||
.env* |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
language: node_js | ||
|
||
node_js: | ||
- "lts/*" | ||
- 'lts/*' | ||
|
||
branches: | ||
only: | ||
|
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 |
---|---|---|
@@ -1,41 +1,17 @@ | ||
FROM node:10-alpine as build | ||
LABEL maintainer="Michael Feher, Matteo Vivona, Maksim Sinik" | ||
FROM node:12-alpine as build | ||
|
||
# set app basepath | ||
ENV HOME=/home/app | ||
|
||
# copy all app files | ||
COPY . $HOME/node/ | ||
|
||
# change workgin dir and install deps in quiet mode | ||
WORKDIR $HOME/node | ||
RUN npm ci -q | ||
RUN npm install -q | ||
|
||
# compile typescript and build all production stuff | ||
RUN npm run build | ||
|
||
# remove dev dependencies that are not needed in production | ||
RUN npm prune --production | ||
|
||
# start new image for lower size | ||
FROM node:10-alpine | ||
|
||
# create use with no permissions | ||
RUN addgroup -g 101 -S app && adduser -u 100 -S -G app -s /bin/false app | ||
|
||
# set app basepath | ||
ENV HOME=/home/app | ||
|
||
# copy production complied node app to the new image | ||
COPY --from=build $HOME/node/ $HOME/node/ | ||
RUN chown -R app:app $HOME/* | ||
|
||
# run app with low permissions level user | ||
USER app | ||
WORKDIR $HOME/node | ||
|
||
EXPOSE 3000 | ||
|
||
ENV NODE_ENV=production | ||
FROM nginx:stable-alpine | ||
|
||
CMD [ "yarn", "start" ] | ||
COPY --from=build /home/app/node/build/ /usr/share/nginx/html | ||
COPY nginx.conf /etc/nginx/conf.d/default.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] |
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 was deleted.
Oops, something went wrong.
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,85 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- refs/tags/v* | ||
|
||
pr: none | ||
|
||
stages: | ||
- stage: Build | ||
jobs: | ||
- job: npm_job | ||
continueOnError: false | ||
pool: | ||
vmImage: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_12_x: | ||
node_version: 12.x | ||
maxParallel: 5 | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: $(node_version) | ||
displayName: 'Install Node.js' | ||
- bash: npm install | ||
displayName: 'Install dependencies' | ||
- bash: npm run lint | ||
displayName: 'Lint code' | ||
- bash: npm run build | ||
displayName: 'Build code' | ||
- bash: npm run test:ci | ||
displayName: 'Test compiled code' | ||
- job: yarn_job | ||
continueOnError: false | ||
pool: | ||
vmImage: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node_12_x: | ||
node_version: 12.x | ||
maxParallel: 5 | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: $(node_version) | ||
displayName: 'Install Node.js' | ||
- bash: yarn install | ||
displayName: 'Install dependencies' | ||
- bash: yarn lint | ||
displayName: 'Lint code' | ||
- bash: yarn build | ||
displayName: 'Build code' | ||
- bash: yarn test:ci | ||
displayName: 'Test compiled code' | ||
|
||
- stage: Docker | ||
jobs: | ||
- job: docker_job | ||
condition: succeeded('Build') | ||
continueOnError: false | ||
pool: | ||
vmImage: ubuntu-latest | ||
steps: | ||
- script: | | ||
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json | ||
sudo service docker restart | ||
displayName: 'Enable Docker Engine experimental ' | ||
- script: | | ||
GIT_TAG=`git describe --tags` && VERSION_TAG="$(cut -d'-' -f1 <<<"$GIT_TAG")" && echo "##vso[task.setvariable variable=VERSION_TAG]$VERSION_TAG" | ||
displayName: 'Get Git Tag' | ||
- task: Docker@0 | ||
displayName: 'Build an image' | ||
inputs: | ||
containerregistrytype: 'Container Registry' | ||
dockerRegistryConnection: Docker # it is necessary to create a new "service connection" via Azure DevOps portal | ||
dockerFile: ./Dockerfile | ||
buildArguments: '--rm --squash' | ||
imageName: '$(Build.Repository.Name):$(VERSION_TAG)' | ||
- task: Docker@0 | ||
displayName: 'Push an image' | ||
inputs: | ||
containerregistrytype: 'Container Registry' | ||
dockerRegistryConnection: Docker # it is necessary to create a new "service connection" via Azure DevOps portal | ||
action: 'Push an image' | ||
imageName: '$(Build.Repository.Name):$(VERSION_TAG)' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri /index.html; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
|
||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} |
Oops, something went wrong.