mirror of
https://github.com/sergeyyarkov/node-docker-example.git
synced 2026-10-11 18:29:34 +03:00
fix
This commit is contained in:
parent
1093167ed6
commit
e1d5421fa2
@ -27,7 +27,7 @@ application.
|
||||
## How to deploy
|
||||
|
||||
- 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`
|
||||
|
||||
## Requirements
|
||||
|
||||
@ -21,9 +21,7 @@ services:
|
||||
target: production
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- ${PORT}:${PORT}
|
||||
env_file:
|
||||
- .env
|
||||
- 4000:4000
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PG_HOST=postgres
|
||||
@ -55,9 +53,9 @@ services:
|
||||
- ./sql/schema_init.sql:/docker-entrypoint-initdb.d/schema_init.sql
|
||||
- ./sql/seed.sql:/docker-entrypoint-initdb.d/seed.sql
|
||||
environment:
|
||||
POSTGRES_USER: ${PG_USER}
|
||||
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
||||
POSTGRES_DB: ${PG_DB_NAME}
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: 1234
|
||||
POSTGRES_DB: articles
|
||||
ports:
|
||||
- 5432:5432
|
||||
networks:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user