Skip to content

Commit

Permalink
readme file updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gurkanguray committed Aug 16, 2023
1 parent 3cf3509 commit ff9dd05
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ kamp.us web projects & packages
- sozluk: turkce terimler sozlugu - https://sozluk.dev.kamp.us
- pano: link & bilgi & soru cevap paylasim platformu - https://pano.dev.kamp.us
- gql: https://gql.dev.kamp.us/graphql
- pasaport: kampus icin kullanici bilgileri & [centralized auth](https://sozluk.dev.kamp.us/centralized-auth) servisi - https://pasaport.dev.kamp.us
- pasaport: kampus icin kullanici bilgileri & [centralized auth](https://sozluk.dev.kamp.us/centralized-auth)
servisi - https://pasaport.dev.kamp.us
- storybook: @kampus/ui paketi icin hosted storybook - https://ui.dev.kamp.us

## IMPORTANT NOTE
Expand All @@ -18,7 +19,7 @@ and say hi to us at #kampus-projects channel.
## Getting started

- Fork `kamp-us/monorepo` under your personal account.
- eg: `usirin/monorepo`
- eg: `usirin/monorepo`
- Clone the project to your local computer:

```sh
Expand Down Expand Up @@ -46,3 +47,44 @@ If you haven't already install [Volta](https://volta.sh), you can install instal
```sh
curl https://get.volta.sh | bash
```

## Docker Setup

### Dockerfile

- We use a multi-stage build process to separate the building of applications from the final production image. This
ensures smaller and more optimized production images.
- We build three services: `kampus`, `gql`, and `pasaport`. Each service has its dedicated builder stage followed by its
execution stage.
- The `node:18-bullseye-slim` image is used to keep the final production images lean.

### Docker Compose

- We have four primary services: `mysql`, `kampus`, `gql`, and `pasaport`.
- `mysql` is the database service. We ensure that its authentication is set correctly and ports are mapped to allow for
local development access.
- The other three services are built using the project's Dockerfile. These services are exposed on ports 3000, 3001, and
3002 respectively.
- Health checks are set up for each service to ensure they are running correctly.

## Running a Fully Clean Build with Docker Compose

- To build the images and run the containers, run the following command:

```sh
docker-compose up --build -d
```

- To stop the containers, run the following command:

```sh
docker-compose down
```

## Running a Fully Clean Build with Docker

- Build and start the services, ensuring Docker Compose builds the images from scratch without using any cache.

```sh
docker-compose up --build --force-recreate
```

0 comments on commit ff9dd05

Please sign in to comment.