diff --git a/README.md b/README.md index 00a18ca..dea7745 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index dc830af..c62ba5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: