Skip to content

Commit

Permalink
feat: refs #109849 setup ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoMaurice committed Jul 23, 2019
1 parent f138a1b commit db8baa7
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
logs/
.env
src/front/build
docker
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ yarn-error.log
.env
logs/
.DS_Store
src/front/build
spec/coverage
spec/coverage
build
3 changes: 3 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cache:
paths:
- node_modules/

script:
- apk --no-cache add --virtual builds-deps build-base python

stages:
- build
- test
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:12-alpine as builder

COPY . /usr/src/app

WORKDIR /usr/src/app

RUN apk update && \
apk upgrade && \
apk --no-cache add --virtual builds-deps build-base python && \
yarn && \
yarn build && \
rm -r ./node_modules && \
yarn --production && \
touch .env
# End of build stage

FROM node:12-alpine

COPY --from=builder /usr/src/app /usr/src/app

WORKDIR /usr/src/app

CMD [ "yarn", "start" ]

0 comments on commit db8baa7

Please sign in to comment.