-
Notifications
You must be signed in to change notification settings - Fork 22
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
Samuel Bodin
authored
Jul 8, 2021
1 parent
cbc545d
commit 21b5d02
Showing
8 changed files
with
2,614 additions
and
69 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
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 @@ | ||
# Dependencies | ||
**/node_modules | ||
|
||
# Useless and heavy folders | ||
**/dist | ||
coverage/ | ||
junit/ | ||
|
||
# Logs | ||
**/*.log | ||
**/.env* | ||
|
||
# Other useless files in the image | ||
cypress/ | ||
.git/ | ||
.github/ | ||
.githooks/ | ||
.circleci/ | ||
.husky/ | ||
.nodemon.json | ||
.editorconfig | ||
.gitattributes | ||
.coveralls.yml | ||
.prettierignore | ||
.prettierrc.js | ||
.eslintrc.js | ||
.nvmrc | ||
.npmrc | ||
.eslintignore | ||
.eslinrcjs | ||
.tern-project | ||
cypress.json | ||
cloudbuild.yaml | ||
docker-compose.yml | ||
MAINTAINERS.md | ||
README.md | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
**/*.test.ts | ||
**/*.test.tsx | ||
**/*.test.js | ||
**/*.stories.tsx | ||
**/*.spec.ts | ||
**/*.spec.js | ||
**/*.perf.ts | ||
package-lock.json | ||
renovate.json | ||
**/jest* | ||
**/.DS_Store | ||
.vscode | ||
**/.storybook/ | ||
**/__fixtures__/ | ||
**/__snapshots__/ | ||
**/__mocks__/ | ||
**/__mock__/ | ||
**/__tests__/ | ||
**/tsconfig.tsbuildinfo | ||
Procfile | ||
release.config.js |
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,43 @@ | ||
# ---- Base ---- | ||
FROM node:14.16.1-alpine AS base | ||
|
||
ENV NODE_ENV production | ||
|
||
# Setup the app WORKDIR | ||
WORKDIR /app | ||
|
||
# Copy and install dependencies separately from the app's code | ||
# To leverage Docker's cache when no dependency has change | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dev dependencies | ||
RUN true \ | ||
# && yarn set version berry \ | ||
&& yarn install --production=false | ||
|
||
# This step will invalidates cache | ||
COPY . /app | ||
RUN ls -lah /app | ||
|
||
# Builds the code and reinstall node_modules in prod mode | ||
RUN true \ | ||
&& yarn build \ | ||
&& yarn install --production=true \ | ||
&& rm -rf src/ \ | ||
&& rm -rf .yarn/ | ||
|
||
# ---- Final ---- | ||
# Resulting new, minimal image | ||
# This image must have the minimum amount of layers | ||
FROM node:14.16.1-alpine as final | ||
|
||
# Do not use root to run the app | ||
USER node | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=base --chown=node:node /app /app | ||
|
||
EXPOSE 8000 | ||
|
||
CMD [ "npm", "start" ] |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* eslint-disable import/no-commonjs */ | ||
/* eslint-disable no-template-curly-in-string */ | ||
module.exports = { | ||
branches: 'master', | ||
verifyConditions: ['@semantic-release/github'], | ||
prepare: [ | ||
{ | ||
path: '@semantic-release/changelog', | ||
changelogFile: 'CHANGELOG.md', | ||
}, | ||
'@semantic-release/npm', | ||
{ | ||
path: '@semantic-release/git', | ||
assets: ['package.json', 'CHANGELOG.md'], | ||
message: | ||
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}', | ||
}, | ||
], | ||
publish: ['@semantic-release/github'], | ||
success: [], | ||
fail: [], | ||
npmPublish: false, | ||
}; |
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,12 @@ | ||
#! /bin/sh | ||
|
||
set -e | ||
|
||
current=$(node -e "console.log(require('./package.json').version)") | ||
echo "Releasing: $current" | ||
echo "" | ||
|
||
docker build \ | ||
-t algolia/npm-search \ | ||
-t "algolia/npm-search:${current}" \ | ||
. |
Oops, something went wrong.