Skip to content

Repository files navigation

WebApp-Contacts

Getting started

Here are the recommended steps, to start the project on your local machine (in development mode):
  • Clone this repository to your local machine;

  • Install the database MariaDB on your local machine;

  • Install all dependencies:

    npm install && cd frontend/ && npm install
    
  • Create the .env.development.local file in the root folder with the following keys and values:

    HOST=0.0.0.0
    PORT=3000
    
    DB_HOST=localhost
    DB_PORT=3306
    MARIADB_USER=root
    MARIADB_PASSWORD=root
    MARIADB_DATABASE=contactsdatabase
    MARIADB_ROOT_PASSWORD=root
    
  • Create the database named 'contactsdatabase': CREATE DATABASE 'contactsdatabase'; using the MariaDB command prompt.

  • Run the migrate command npm run db:migrate:dev if it is necessary and run the seed command npm run db:seed:dev if it is necessary. Otherwise, the tables will be created automatically with the command npm run start:dev

  • Run the both parts of the project locally in development mode:

    npm run start:dev
    npm run dev
    
Here are the recommended steps, to create and start the project in a docker container on your local machine:
  • Clone this repository to your local machine;

  • Create the .env file in the root folder with the following keys and values:

    HOST=0.0.0.0
    PORT=4000
    
    DB_HOST=database
    DB_PORT=3306
    MARIADB_USER=root
    MARIADB_PASSWORD=root
    MARIADB_DATABASE=contactsdatabase
    MARIADB_ROOT_PASSWORD=root
    MARIADB_DATABASE=contactsdatabase
    
  • The field service/database/image in the docker-compose.yml file must be changed to mariadb:latest to use it in production locally.

  • The field service/database/image in the docker-compose.yml file must be changed to crtpdev.azurecr.io/mariadb:10.11.6-debian-11-r6 to use it in production.

  • Run this command in the root folder of the project:

    docker compose up --build -d
    
  • It will be created three docker images with database, backend and frontend parts in the container with name webapp-contacts.

P.S. When the container is built using GitLab, the variables defined in the repository will be used. However, some variables from the .env file will not be used.

Here are the recommended steps, to roll out the project in a local cluster on your local machine:
  • Clone this repository to your local machine

  • Download and install minikube

  • Run minikube start to create and start a local cluster

  • Run minikube tunnel to create a tunnel to get access to the url address of the application. The tab with this command must remain open to be able to access the page

  • Run helm upgrade --install webapp-contacts-charts webapp-contacts-charts -f ./webapp-contacts-charts/values.local.yaml to roll out this project local

  • You can check statuses of the chart components using the "VS-Code Kubernetes extension"


Technologies


Collaborate with your team

Test and Deploy

Use the built-in continuous integration in GitLab.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages