mirror of
https://github.com/PatilShreyas/NotyKT.git
synced 2025-08-06 19:43:03 +08:00

- Added deployment guide for Koyeb, replacing Railway and Heroku due to new charges. - Archived Railway and Heroku deployment documentation for historical reference. - Added Docker setup guide for consistent local development.
1.5 KiB
1.5 KiB
Docker Usage
Docker provides a consistent and isolated environment for running the NotyKT API and its dependencies. This approach is recommended for development to ensure consistency across different environments.
Prerequisites
Before you begin, make sure you have the following installed on your machine:
Running with Docker
Follow these steps to run the NotyKT API using Docker:
- Clone the repository
- Navigate to the project root directory (
noty-api
) - Create a
.env
file in the root directory with the required environment variables:
SECRET_KEY=ANY_RANDOM_SECRET_VALUE
PGPORT=5432
PGHOST=db
PGDATABASE=notykt_dev_db
PGUSER=postgres
PGPASSWORD=postgres
DATABASE_DRIVER=org.postgresql.ds.PGSimpleDataSource
DATABASE_MAX_POOL_SIZE=10
- Run the following command to start the application and database:
docker-compose up
This will start:
- PostgreSQL database on port 5432
- NotyKT API application on port 8080
You can access the API at http://localhost:8080
once the services are up and running.
Additional Docker Commands
Here are some useful Docker commands for managing the NotyKT API:
-
To run the services in the background:
docker-compose up -d
-
To stop the services:
docker-compose down
-
To rebuild the application after making changes:
docker-compose up --build
-
To view logs:
docker-compose logs -f