Compare commits

...

2 Commits

Author SHA1 Message Date
c42fcc8ea6
that was..stupid, removed env.local from build 2022-12-14 00:49:04 +05:00
2ec443939f
readme update 2022-12-14 00:48:19 +05:00
2 changed files with 20 additions and 3 deletions

View File

@ -25,8 +25,7 @@ RUN git clone https://git.shihaam.dev/shihaam/okiba-org-frontend \
&& nvm install node \
&& cd /root/okiba-org-backend ; pnpm build \
&& wget -O words.txt https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt \
&& cd /root/okiba-org-frontend ; pnpm install ; pnpm run build \
&& echo 'VITE_SERVER_URL=http://localhost:8080' > .env.local
&& cd /root/okiba-org-frontend ; pnpm install ; pnpm run build
# Copy Start Services
COPY buildfiles/start_services.sh .

View File

@ -1,6 +1,8 @@
## Okiba Docker
# Getting started
- save the follwing content as `docker-compose.yml`
```yml
services:
#########################
@ -8,11 +10,13 @@ services:
hostname: okiba
image: git.shihaam.dev/dockerfiles/okiba-org-docker
volumes:
- $PWD/backend-env:/root/okiba-org-backend/.env
- $PWD/frontend-env:/root/okiba-org-frontend/.env.local
- $PWD/logs/npm:/root/.npm/_logs/
- $PWD/data/:/root/okiba-org-backend/data
- $PWD/.env:/root/okiba-org-backend/.env
ports:
- 3000:3000
- 8080:8080
restart: always
#########################
postgres:
@ -27,3 +31,17 @@ services:
restart: unless-stopped
```
- Make a new file called `backend-env` and configure it for backend process, here is a sample file:
```env
PORT = 8080
PGUSER = okiba
PGHOST = okiba
PGDATABASE = okiba
PGPORT = 5432
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`