Open rohinsood opened 6 months ago
The "Hoops to Harvest" simulator is a game where players simulate the life of a character who starts as either a basketball player or a farmer. Players make decisions at various points, influencing the character's success, primarily measured by accumulated money. The results are stored on a leaderboard for comparison with other players.
For our backend infrastructure, we run both servers under one docker instance and then there are two separate containers within the same instance that each server runs on a unique port. So, this essentially allows us to manage and monitor the status of both servers using docker and once we have that, we run into a few issues, which we documented in this blog.
So basically there is an integrated database where two servers are able to access and change in the same database. And this allows for like two different applications to be able to be used in the same projects for like data science applications vs. like a spring boot specific application. Anyways, what I personally worked on was a dual login authenticator. How this works is that in the flask server and in the spring boot server, there is two different models for the user and the person, and what we do is that in the frontend we create two separate requests with the same email and password, and what this allows us to do is to basically login into both web servers, login into both backend servers, and we are able to access protected routes, once we’re logged on both ends. And we login into both ends mainly so we can have protected routes in the backend or the JWT. Although, we should only need one in a typical application but you can see here via postman and different requests, that this was our main approach of constructing a dual login authenticator.
Objective
The objective of this final sprint and feature addition is to integrate the Java Spring application and Python Flask application within a single backend repository. This involves setting up a Dockerized environment where both applications can run concurrently, share a common SQLite database, and utilize the same data. This integration aims to streamline development, improve efficiency, and ensure both applications can seamlessly interact with the shared database.
Tasks
docker-compose.yml
to orchestrate the containers and share the SQLite database volume.Plan
Requirements
docker-compose.yml
file to manage the multi-container setup. @rohinsoodDocker Setup
docker-compose.yml
to include both application services and a shared volume for the SQLite database. @rohinsoodDatabase Schema Integration
Configuration & Deployment
docker-compose.yml
to set up database connections for both applications. @vardaansinhaUtilization
Schedule
docker-compose.yml
and set up the shared database volume. Implement and test database connections in both applications.Example Configuration
docker-compose.yml