Skip to content
Snippets Groups Projects
Commit 3aaa6154 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Update build config, readme and ci

parent 626d9b91
No related branches found
No related tags found
1 merge request!19fix type imports
# stages:
# - Build
# # - Test
# - Docker build
# - Deploy
stages:
- Build
# #services:
# # - mongo
# variables:
# CONTAINER_IMAGE: 'registry.kszk.bme.hu/bodysch/frontend:$CI_COMMIT_REF_NAME'
# # MONGODB_TEST_URI: 'mongodb://mongo/bodysch-test'
# Build:
# stage: Build
# tags: [kszk]
# image: node:14
# script:
# - npm install
# - npm run build
# cache:
# paths:
# - node_modules/
# - build/
# artifacts:
# expire_in: 1 day
# paths:
# - node_modules/
# - build/
# Docker build:
# stage: Docker build
# tags: [kszk]
# only:
# - master
# - DEV
# image:
# name: gcr.io/kaniko-project/executor:debug
# entrypoint: ['']
# script:
# - echo "{\"auths\":{\"registry.kszk.bme.hu\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
# - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CONTAINER_IMAGE
# Deploy dev:
# stage: Deploy
# tags: [kszk-deploy] # request the custom SSH executor
# only:
# - DEV
# script: # your deploy logic
# - echo "$REGISTRY_PASSWORD" | docker login registry.kszk.bme.hu --username $REGISTRY_USER --password-stdin
# - cp docker-compose.dev.yml /home/kszk-gitlab-deployer/bodysch-dev/
# - cd /home/kszk-gitlab-deployer/bodysch-dev/
# - docker-compose -f docker-compose.dev.yml --no-ansi pull
# - docker-compose -f docker-compose.dev.yml up -d
# - docker system prune -f
# variables:
# SSH_HOST: donald.sch.bme.hu # required
# SSH_USER: kszk-gitlab-deployer # default: kszk-gitlab-deployer
# SSH_PORT: 10122 # default: 22
Build:
stage: Build
tags: [kszk]
image: node:16
script:
- npm install
- npm run build
cache:
paths:
- node_modules/
- build/
artifacts:
expire_in: 1 day
paths:
- node_modules/
- build/
FROM nginx:1.19.2
FROM docker.io/nginx:1.21.0
# copy the files builded with npm run build
COPY build /var/www
......
## BodySCH Frontend
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
#### Local proxy
`./tools/local_proxy/Caddyfile/`
Create a local proxy with caddy:
`docker run -d -it --name caddyFrontend -v /path/to/Caddyfile:/etc/caddy/Caddyfile --network host caddy`
When you change the config just `docker stop ...` and `docker start ...`.
If you experience any error check it with `docker logs ...`.
version: '3.7'
services:
bodysch-backend-dev:
container_name: bodysch-backend-dev
image: registry.kszk.bme.hu/bodysch/backend:dev
restart: always
ports:
- '3030:8000'
links:
- bodysch-mongo-dev
env_file:
- .env
depends_on:
- bodysch-mongo-dev
bodysch-mongo-dev:
container_name: bodysch-mongo-dev
image: mongo
volumes:
- ./data:/data/db
expose:
- '27017'
bodysch-frontend-dev:
container_name: bodysch-frontend-dev
image: registry.kszk.bme.hu/bodysch/frontend:DEV
restart: always
ports:
- '3040:3040'
depends_on:
- bodysch-backend-dev
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment