diff --git a/README.md b/README.md index 4f2740c..0d58a4f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,29 @@ # node-docker-example +## About + This app showcases a website built with NodeJS. The site has a set of articles, each article has a separate page, all data about the article is stored in the PostgreSQL database. Docker is used to deploy the application. +## Folder structure + +... + ## How to deploy + +```bash +# Clone +git clone https://github.com/sergeyyarkov/node-docker-example.git . + +# Build +docker compose build + +# Run +docker compose up +``` + +## Envitoment variables + +... diff --git a/docker-compose.yml b/docker-compose.yml index bb4107c..805933a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,8 @@ services: image: postgres:14 volumes: - postgres_volume:/var/lib/postgresql/data + - ./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}