Skip to content

Latest commit

 

History

History
71 lines (45 loc) · 2.06 KB

README.md

File metadata and controls

71 lines (45 loc) · 2.06 KB

Employee admin service

This is a local service for managing our employee database

The full technical requirements for this project so far can be seen in REQS

The overall DB structure is this

DB!

Quick start running the service

Install Docker and Docker compose (usually shipped together), then run in the terminal from the root of this project this command:

docker-compose -f run-local-service.yaml  pull
docker-compose -f run-local-service.yaml  up

It's important to execute the pull command so that it checks in case the image changed, otherwise it will always use the local copy.

It will download the latest build and connect to a local database with everything you need to get started.

To see a few sample HTTP requests used during the development of this services, please read REST API

Local development

In order to start the services needed you need to install Docker and Docker compose (usually shipped together) in your development machine, there are a lot of resources on how to do that.

Once the tool is up and running just run this in the project directory:

docker-compose up

It will start a local MySQL database and create the tables as defined in ./db/database.sql

To facilitate running during the development process, you can use the air command, it will monitor changes in the source code and build and run for you the service, you can start testing very easily with it.

https://github.com/cosmtrek/air

Building and publishing the service

Request access to this private repository to see the CI/CD pipelines
https://github.com/sir-farfan/litt/actions

Project dashboard:

https://github.com/sir-farfan/litt/projects/1

Restarting the DB

The DB running in Docker will keep all your records across restarts, if you want to delete everything for whatever reason, just run

docker compose rm

Running with docker

Public repository

Published and nightly build images can be found in Docker Hub at: https://hub.docker.com/repository/docker/sulfurf/litt