mirror of
https://github.com/sergeyyarkov/node-docker-example.git
synced 2026-10-11 10:19:41 +03:00
fix
This commit is contained in:
parent
1093167ed6
commit
e1d5421fa2
@ -27,7 +27,7 @@ application.
|
|||||||
## How to deploy
|
## How to deploy
|
||||||
|
|
||||||
- 1. Clone this repository `git clone https://github.com/sergeyyarkov/node-docker-example.git .`
|
- 1. Clone this repository `git clone https://github.com/sergeyyarkov/node-docker-example.git .`
|
||||||
- 2. Configure enviroment variables in `docker-compose.yml` if you need to
|
- 2. Configure enviroment variables in `docker-compose.yml` for `postgres` and `nodejs` serivces if you need to
|
||||||
- 3. Build and run application with `docker compose up --build`
|
- 3. Build and run application with `docker compose up --build`
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|||||||
@ -21,9 +21,7 @@ services:
|
|||||||
target: production
|
target: production
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- ${PORT}:${PORT}
|
- 4000:4000
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- PG_HOST=postgres
|
- PG_HOST=postgres
|
||||||
@ -55,9 +53,9 @@ services:
|
|||||||
- ./sql/schema_init.sql:/docker-entrypoint-initdb.d/schema_init.sql
|
- ./sql/schema_init.sql:/docker-entrypoint-initdb.d/schema_init.sql
|
||||||
- ./sql/seed.sql:/docker-entrypoint-initdb.d/seed.sql
|
- ./sql/seed.sql:/docker-entrypoint-initdb.d/seed.sql
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${PG_USER}
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
POSTGRES_PASSWORD: 1234
|
||||||
POSTGRES_DB: ${PG_DB_NAME}
|
POSTGRES_DB: articles
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user