mirror of
https://github.com/xlorepdarkhelm/numinar-coding-project.git
synced 2026-09-08 08:28:18 -04:00
43 lines
1.4 KiB
Markdown
43 lines
1.4 KiB
Markdown
# Online Booking Application
|
|
|
|
## Cliff Hill's Coding Project
|
|
|
|
### AI Use
|
|
|
|
I used AI to stub out a couple of files:
|
|
|
|
* The backend/Dockerfile and frontend/Dockerfile - to speed up the process of getting docker loaded efficiently for the project.
|
|
* The compose.yml file - getting the different images gathered together quickly.
|
|
* The compose.dev.yml file - used to get a further understanding of how to hook up an extension to the previous file.
|
|
* The mermaid diagrams used in this file.
|
|
|
|
### Running for production
|
|
|
|
The standard docker compose file is used to set up the project in the production environment, and can be run from the following command:
|
|
|
|
```bash
|
|
docker compose up
|
|
```
|
|
|
|
### Local running
|
|
|
|
There is an alternative compose file specifically designed for running this project locally which allows for real-time editing and updating of either the frontend or backend components. The command ro tun everything locally is:
|
|
|
|
```bash
|
|
docker compose -f compose.dev.yml up
|
|
```
|
|
|
|
This compose file extends the standard compose file, adding in the necessary pieces to make the application usable in a local dev environment. In this configuration, the frontend is accessable from port 3000 like normal, the backend is accessable from port 8000, and postgres DB from 5432.
|
|
|
|
### Diagrams
|
|
|
|
Docker Compose Components:
|
|
|
|
```mermaid
|
|
graph TD
|
|
A[Frontend] -->|HTTP/REST| B[Backend]
|
|
B -->|SQL| C[Postgres]
|
|
A -->|Docker Network| B
|
|
B -->|Docker Network| C
|
|
```
|