Skip to content

Commit

Permalink
switch from yarn to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
fileformat committed Jul 15, 2022
1 parent 0fd8835 commit 80d9bad
Show file tree
Hide file tree
Showing 10 changed files with 5,514 additions and 2,453 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ FROM base AS build
WORKDIR /app
USER appuser
COPY --chown=appuser:appuser . .
RUN yarn install && \
yarn run build
RUN npm install && \
npm run build

FROM base AS run
ARG COMMIT="(not set)"
Expand All @@ -18,8 +18,8 @@ WORKDIR /app
USER appuser
COPY --chown=appuser:appuser . .
COPY --chown=appuser:appuser --from=build /app/dist /app/dist
RUN yarn install --production
RUN npm install --production
EXPOSE 4000
ENV PORT 4000
CMD ["yarn", "start"]
CMD ["node", "dist/server.js"]

22 changes: 22 additions & 0 deletions docker-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -o errexit
set -o pipefail
set -o nounset

docker build -t logosearch .

if [ ! -f ".env" ]
then
echo "ERROR: no .env file!"
exit 1
fi
export $(cat .env)

docker run -it \
--publish 4000:4000 \
--expose 4000 \
--env "INDEX_URLS=${INDEX_URLS}" \
--env "LOG_LEVEL=${LOG_LEVEL}" \
logosearch

0 comments on commit 80d9bad

Please sign in to comment.