Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calcagnoloic/invoice-app-server
Backend application and invoice application database. Contains the various CRUD routes and a backup of dummy data.
https://github.com/calcagnoloic/invoice-app-server
crud docker-compose fastapi mariadb python unitest
Last synced: about 1 month ago
JSON representation
Backend application and invoice application database. Contains the various CRUD routes and a backup of dummy data.
- Host: GitHub
- URL: https://github.com/calcagnoloic/invoice-app-server
- Owner: CalcagnoLoic
- Created: 2024-05-06T23:24:25.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-06T07:51:45.000Z (5 months ago)
- Last Synced: 2024-08-24T14:46:44.026Z (3 months ago)
- Topics: crud, docker-compose, fastapi, mariadb, python, unitest
- Language: Python
- Homepage:
- Size: 5.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Invoice App Server
π§ Please note that the application is currently under development and is only available locally. To run it on your computer, please refer [here](https://github.com/CalcagnoLoic/invoice-app-web?tab=readme-ov-file#launching-frontend-server) for frontend installation. Thank you for your understanding.π§
## Launching backend `docker compose`
πWith docker compose, locally, the database is persisted but not made available on github. To access the data in the database, you'll find a file called `data.sql` in the app folder. To use it, start docker compose and connect to the Adminer service. π
To connect to the database service, simply write these environment variables to a file named `.env` at the root of app folder. These variables is dummy data. During the development phase, these variables will no longer be available.
```
MARIADB_USER=admin@invoice-app
MARIADB_PASSWORD=f*Ap-uidtp
MARIADB_DATABASE=invoice_app
MARIADB_ROOT_PASSWORD=root
```Then you can run this command:
```cmd
docker compose up
```οΈπ¨βπ§οΈ ***WARNING***, it is possible that the backend service crashes on first execution with this message π¨βπ§
```
οΈbackend-1 | sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'database' ([Errno 111] Connection refused)")
```π¨βπ§If so, just restart the service from docker desktop. π¨βπ§
Once all services are up and running, go to adminer (http://localhost:8080/) and log in with MARIADB data. On the left, you'll see the βImportβ action. All you have to do is select the sql file and your database is ready! π₯³
## User Stories
Your users should be able to:
- [ ] Create, read, update, and delete invoices In Progress
- [x] Bonus: Build this project as a full-stack application## Built with
- Python 3.12 - FastAPI
- Docker 4.30## Authors
- Personnal website - [Portfolio](https://calcagno-loic.netlify.app/)
- Frontend Mentor - [@CalcagnoLoic](https://www.frontendmentor.io/profile/CalcagnoLoic)
- Linkedin - [LinkedIn](https://www.linkedin.com/in/loic-calcagno/)