https://github.com/nderousseaux/internmap-backend
backend for the project "internmap"
https://github.com/nderousseaux/internmap-backend
flask internmap project web
Last synced: 2 months ago
JSON representation
backend for the project "internmap"
- Host: GitHub
- URL: https://github.com/nderousseaux/internmap-backend
- Owner: nderousseaux
- Created: 2023-09-22T07:42:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T17:08:59.000Z (about 2 years ago)
- Last Synced: 2025-04-06T12:46:10.294Z (about 1 year ago)
- Topics: flask, internmap, project, web
- Language: Python
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# internmap-backend
backend for the project "internmap"
The service propose an API to get the data from the database.
There is 2 endpoints:
- `/` to get the hello world message.
- `/data` to get the list of companies and the tags.
## Development
Copy/paste the file `.env.example` to `.env` and fill the variables.
### Database
Start up the database with `docker-compose up -d`.
If it's the first time, you need to create the databse from the file `structure.sql`
```bash
docker compose -f bdd/docker-compose.yml exec -T db mysql -u root -ppassword db < bdd/structure.sql
```
Now, you can import your data from the file `data.sql`
```bash
docker compose -f bdd/docker-compose.yml exec -T db mysql -u root -ppassword db < $PATH_TO_DATA_FILE
```
### Server
Launch the server with `python src/main.py`.
If needed, you can install the dependencies with `pip install -r requirements.txt`.
The server is available at `http://localhost:5001`.
## Deployment
All commit on the `main` branch are deployed on Google Cloud Run.
For the deployment, `Dockerfile` and `gcloud-build.yml` are used.
It's necessary to indicate the environment variables in the Google Cloud Build configuration.