-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Docker, PSQL db, clear old code
- Loading branch information
RuzikNF
committed
Dec 2, 2020
1 parent
800d9d0
commit 12d5344
Showing
14 changed files
with
1,412 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
www/ | ||
*.tsbuildinfo | ||
production.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
www/ | ||
*.tsbuildinfo | ||
*.tsbuildinfo | ||
production.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:alpine AS builder | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm ci | ||
RUN npm run build:prod | ||
RUN npm run build:server | ||
|
||
FROM node:alpine AS runner | ||
WORKDIR /app | ||
COPY --from=builder /app/dist ./dist | ||
COPY --from=builder /app/www ./www | ||
COPY package* ./ | ||
COPY nest-cli.json ./ | ||
COPY tsconfig* ./ | ||
COPY *.env ./ | ||
RUN npm ci --production | ||
CMD node . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
## Приложение для проведения юридических консультаций на базе WebRTC | ||
|
||
*Нам бы нужно какое-нибудь интересное имя, предлагаю подумать на досуге...* | ||
|
||
Возможен запуск в виде Docker-образа. | ||
|
||
Бекенд-часть на базе Nest.JS располагается в папке `/server`, фронтенд-часть на базе React.js - в `/client`. Используемая БД: PostgreSQL ([docker-образ](https://hub.docker.com/_/postgres)). | ||
|
||
Быстрый запуск: | ||
```bash | ||
git clone https://git.infostrategic.com/hse/webrtchse1 | ||
npm ci | ||
npm run build | ||
npm start | ||
``` | ||
|
||
## Бекенд | ||
|
||
Компиляция в JS: | ||
``` | ||
npm run build:server | ||
``` | ||
|
||
Запуск: | ||
``` | ||
npm run start | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
POSTGRES_PASSWORD=wrtcp | ||
POSTGRES_USER=wrtcu | ||
POSTGRES_DB=webrtc | ||
PORT=8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"version": "3.8", | ||
"networks": { | ||
"db": {} | ||
}, | ||
"volumes": { | ||
"db": {} | ||
}, | ||
"services": { | ||
"db": { | ||
"env_file": "./development.env", | ||
"image": "postgres", | ||
"networks": [ | ||
"db" | ||
], | ||
"ports": [ | ||
"5432:5432" | ||
], | ||
"restart": "always" | ||
}, | ||
"backend": { | ||
"build": ".", | ||
"depends_on": [ | ||
"db" | ||
], | ||
"env_file": "./development.env", | ||
"networks": [ | ||
"db" | ||
], | ||
"ports": [ | ||
"8080:8080" | ||
], | ||
"restart": "always" | ||
} | ||
} | ||
} |
Oops, something went wrong.