mirror of
https://github.com/sergeyyarkov/node-docker-example.git
synced 2026-10-11 10:19:41 +03:00
readme
This commit is contained in:
parent
9dcd55d229
commit
1093167ed6
6
.env.example
Normal file
6
.env.example
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
PORT=4000
|
||||||
|
PG_HOST=<db_host>
|
||||||
|
PG_PORT=<db_port>
|
||||||
|
PG_USER=<db_user>
|
||||||
|
PG_PASSWORD=<db_password>
|
||||||
|
PG_DB_NAME=<db_database_name>
|
||||||
33
README.md
33
README.md
@ -9,21 +9,28 @@ application.
|
|||||||
|
|
||||||
## Folder structure
|
## Folder structure
|
||||||
|
|
||||||
...
|
```text
|
||||||
|
.
|
||||||
|
└── .
|
||||||
|
├── controllers - contains handlers for http requests
|
||||||
|
├── helpers - some string, file and database helper functions
|
||||||
|
├── middlewares - contains functions that will execute before the handler is executed
|
||||||
|
├── models - contains entities for their creation or getting
|
||||||
|
├── nginx - nginx web server config or certificate will place here
|
||||||
|
├── preloads - every file in this folder will be executed before starting the server
|
||||||
|
├── public - contains static files for http response
|
||||||
|
├── scripts - some bash scripts
|
||||||
|
├── sql - database ".sql" files for querying
|
||||||
|
└── views - file for page rendering
|
||||||
|
```
|
||||||
|
|
||||||
## How to deploy
|
## How to deploy
|
||||||
|
|
||||||
```bash
|
- 1. Clone this repository `git clone https://github.com/sergeyyarkov/node-docker-example.git .`
|
||||||
# Clone
|
- 2. Configure enviroment variables in `docker-compose.yml` if you need to
|
||||||
git clone https://github.com/sergeyyarkov/node-docker-example.git .
|
- 3. Build and run application with `docker compose up --build`
|
||||||
|
|
||||||
# Build
|
## Requirements
|
||||||
docker compose build
|
|
||||||
|
|
||||||
# Run
|
- Node.js >= v14.13.0
|
||||||
docker compose up
|
- Docker
|
||||||
```
|
|
||||||
|
|
||||||
## Envitoment variables
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user