Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker sample #63

Merged
merged 3 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# Development

## Running in development mode
## Setup local database

You can install PostgreSQL local https://www.postgresql.org/download/ or use Docker (see `postgres.yml`):
```
version: "3.2"
services:
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: pass
ports:
- 127.0.0.1:5432:5432
n0str marked this conversation as resolved.
Show resolved Hide resolved
volumes:
- ./database:/var/lib/postgresql/data
```

To run it execute: `docker compose -f postgres.yml up -d` where `-d` is used for background run.
If you have outdated version of docker, try use `docker-compose` instead of `docker compose` (https://docs.docker.com/compose/)

## Running application in development mode

To run application in development mode you need to run `npm run dev` command.
It will start application with `nodemon` and restart it on any changes in source code.
Expand Down
10 changes: 10 additions & 0 deletions postgres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.2"
services:
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: pass
ports:
- 127.0.0.1:5432:5432
volumes:
- ./database:/var/lib/postgresql/data