This project is designed as an excercise in , featuring a backend, frontend, database management, and middleware. It leverages Docker for environment management and will include support for PostgreSQL, MongoDB, and Redis as time permits.
As of right now
.
├── backend
├── database
│ ├── mongodb
│ ├── postgresql
│ │ ├── dev.env
│ │ ├── Dockerfile.dev
│ │ └── initdb
│ │ ├── 001_create_tables.sql
│ │ └── 002_insert_mock_data.sql
│ └── redis
├── docker-compose.dev.yaml
├── docker-compose.yml
├── frontend
│ ├── mobile
│ └── web
├── middleware
├── pgadmin
│ ├── dev.env
│ └── Dockerfile.dev
└── README.md- Clone repo
git clone https://github.com/CheoR/chamba.git
cd chamba-
Create environment variable files for PostgreSQL and pgAdmin:
- database/postgresql/dev.env
- pgadmin/dev.env
To start the development environment, run the following command:
docker-compose -f docker-compose.dev.yaml up --build-
PostgreSQL
-
Build context: ./database/postgresql
-
Dockerfile: Dockerfile.dev
-
Ports: 5432:5432
-
Environment variables file: dev.env
-
-
pgAdmin
-
Build context: ./pgadmin
-
Dockerfile: Dockerfile.dev
-
Ports: 80:80
-
Environment variables file: dev.env
-
- postgres_data: Stores PostgreSQL data persistently.
PostgreSQL initialization scripts are located in the database/postgresql/initdb directory:
-
001_create_tables.sql: Creates tables and types.
-
002_insert_mock_data.sql: Inserts mock data into the tables.
Ensure you set the required environment variables in dev.env files for PostgreSQL and pgAdmin. Example for database/postgresql/dev.env:
POSTGRES_USER=yourusername
POSTGRES_PASSWORD=yourpassword
POSTGRES_DB=yourdatabaseExample for pgadmin/dev.env:
PGADMIN_DEFAULT_EMAIL=youremail@example.com
PGADMIN_DEFAULT_PASSWORD=yourpassword
Feel free to submit issues, fork the repo, and create pull requests. Contributions are welcome! License
This project is licensed under the MIT License.