okiba/README.md

48 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2022-12-13 23:56:27 +05:00
## Okiba Docker
2022-12-14 00:48:19 +05:00
# Getting started
- save the follwing content as `docker-compose.yml`
2022-12-13 23:56:27 +05:00
```yml
services:
#########################
okiba:
hostname: okiba
2022-12-14 01:02:43 +05:00
image: git.shihaam.dev/dockerfiles/okiba
2022-12-13 23:56:27 +05:00
volumes:
2022-12-14 00:48:19 +05:00
- $PWD/backend-env:/root/okiba-org-backend/.env
2022-12-13 23:56:27 +05:00
- $PWD/logs/npm:/root/.npm/_logs/
- $PWD/logs/nginx:/var/log/nginx/
2022-12-13 23:56:27 +05:00
- $PWD/data/:/root/okiba-org-backend/data
ports:
2022-12-20 23:21:53 +05:00
- 3000:80
2022-12-14 00:48:19 +05:00
- 8080:8080
2022-12-13 23:56:27 +05:00
restart: always
#########################
2022-12-14 00:09:07 +05:00
postgres:
2022-12-13 23:56:27 +05:00
hostname: okiba-db
image: postgres:13-alpine
volumes:
- $PWD/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=okiba
- POSTGRES_USER=okiba
- POSTGRES_PASSWORD=okiba
restart: unless-stopped
```
2022-12-14 00:48:19 +05:00
- Make a new file called `backend-env` and configure it for backend process, here is a sample file:
```env
PORT = 8080
2022-12-14 00:56:21 +05:00
PGHOST = okiba-db
PGPORT = 5432
2022-12-14 00:48:19 +05:00
PGUSER = okiba
PGDATABASE = okiba
PGPASSWORD = okiba
```
- Make a new file called `frontend-env` and configure it for frontend process, here is a sample file:
```env
VITE_SERVER_URL=http://localhost:8080
```
- Run `docker compose up`