add .circleci

This commit is contained in:
Dawid Wysokiński 2021-04-17 11:04:58 +02:00
parent d8e2784831
commit 4576c79bec
3 changed files with 30 additions and 1 deletions

28
.circleci/config.yml Normal file
View File

@ -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

View File

@ -1 +1,2 @@
GA_TRACKING_ID=G-355ES1R23J
NEXT_PUBLIC_API_URI=https://api.zdamegzaminzawodowy.pl/graphql

View File

@ -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