Update documentation for local & prod setup
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Aadil Ayub 2024-01-24 16:57:22 +05:00
parent 7f5b8e7aa5
commit afccda0eb9
1 changed files with 16 additions and 5 deletions

View File

@ -2,12 +2,23 @@
[![Build Status](https://drone.autonomic.zone/api/badges/ruangrupa/lumbung-kios-cms/status.svg?ref=refs/heads/main)](https://drone.autonomic.zone/ruangrupa/lumbung-kios-cms)
This project was created using create-payload-app using the ts-blank template.
This project was created using `npx create-payload-app` using the ts-blank template.
## How to Use
## Local development
`yarn dev` will start up your application and reload on any changes. Make sure to have mongodb running locally as well.
- First, create a `.env` file in the root, and populate it with these values:
## Deploy
```
MONGODB_URI=mongodb://mongo:27017/lumbung-kios-cms
PAYLOAD_SECRET=5c8ac4a2cd754247f38ae726
PAYLOAD_PUBLIC_SERVER_URL=http://localhost:3000
```
Push commits, it will auto-deploy to [kios-admin.lumbung.space](https://kios-admin.lumbung.space).
- Run `docker-compose -f docker-compose-local.yml up` to get the application running locally.
- The application will have no data by default, so you will have to create your own test products, couriers, retailers, dispatches, and makers.
## Deployment & production setup
Push commits, it will auto-deploy to [kios-admin.lumbung.space](https://kios-admin.lumbung.space). CI/CD is powered by [Drone](https://drone.autonomic.zone/ruangrupa/lumbung-kios-cms), it uses the `Dockerfile` in the root project folder for builds. You can test builds locally using `docker build .`.
The application is running on the `ruangrupa-dedi` server as a vanilla Docker swarm stack.