add .circleci
This commit is contained in:
parent
d8e2784831
commit
4576c79bec
|
@ -0,0 +1,28 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:12.9.1-browsers
|
||||
working_directory: ~/zdamegzaminzawodowy
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
# start proprietary DB using private Docker image
|
||||
# with credentials stored in the UI
|
||||
- run: |
|
||||
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||
# build the application image
|
||||
- run: docker build -t $DOCKER_LOGIN/zdam-egzamin-zawodowy-website:latest .
|
||||
|
||||
# deploy the image
|
||||
- run: docker push $DOCKER_LOGIN/zdam-egzamin-zawodowy-website:latest
|
||||
workflows:
|
||||
version: 2
|
||||
deploy_prod:
|
||||
jobs:
|
||||
- build:
|
||||
context: Zdam-Egzamin-Zawodowy
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
|
@ -1 +1,2 @@
|
|||
GA_TRACKING_ID=G-355ES1R23J
|
||||
NEXT_PUBLIC_API_URI=https://api.zdamegzaminzawodowy.pl/graphql
|
|
@ -9,9 +9,9 @@ RUN yarn install --frozen-lockfile
|
|||
# Rebuild the source code only when needed
|
||||
FROM node:alpine AS builder
|
||||
WORKDIR /app
|
||||
ENV BUILDING_PROCESS true
|
||||
COPY . .
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
ENV BUILDING_PROCESS true
|
||||
RUN yarn build
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
|
|
Reference in New Issue