https://github.com/matsjfunke/diet_code
fullstack react/fastapi web app about my passion for deleting code
https://github.com/matsjfunke/diet_code
axios docker docker-compose fastapi react traefik
Last synced: 3 months ago
JSON representation
fullstack react/fastapi web app about my passion for deleting code
- Host: GitHub
- URL: https://github.com/matsjfunke/diet_code
- Owner: matsjfunke
- Created: 2024-09-01T23:28:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-24T15:28:46.000Z (over 1 year ago)
- Last Synced: 2025-03-24T16:33:25.146Z (over 1 year ago)
- Topics: axios, docker, docker-compose, fastapi, react, traefik
- Language: JavaScript
- Homepage: https://diet-code.dev
- Size: 973 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Diet Code
a web app that ranks developers productivity based on amount of deletions and spreads the gospel of deleting code
## Run locally
```sh
docker-compose up --build
```
**Backend:**
- access localhost:8000/docs for fastapi dashboard -> for testing specific endpoints
- access localhost:8000/openapi.json to generate the OpenAPI documentation
**Frontend:**
- access localhost:3000 and interact with the UI
## Deployment on Server
```sh
# rsync files to server
cd diet-code
rsync -av --exclude-from='.rsyncignore' -e "ssh -i ~/.ssh/" . @:diet-code
# ssh into server
ssh -i ~/.ssh/diet-code root@
# use the deployment script to automate docker & docker-compose installation, and starting docker containers
chmod +x deploy.sh
./deploy.sh
```
go to https://diet-code.dev/taste and try to taste the diet code ranking for any public repo with contributors (try: https://github.com/matsjfunke/psychopy-install-setup)
to stop containers use:
```sh
docker-compose -f docker-compose.prod.yml down
```
### Deploy on VPS with another webapp running
to deploy diet-code along with another webapp on one server use `docker-compose.prod.shared.yml`
```sh
# Build the images
docker-compose -f docker-compose.prod.shared.yml build
# Connect Traefik to the diet-code network
# Network name is prefixed with directory name (diet-code_) by Docker Compose
docker network connect diet-code_diet-code-web traefik
# Start the services
docker-compose -f docker-compose.prod.shared.yml up -d
```