Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve makefile and docs to simplify project setup without docker #42

Open
DevilsAutumn opened this issue Jul 12, 2024 · 17 comments · May be fixed by #49
Open

Improve makefile and docs to simplify project setup without docker #42

DevilsAutumn opened this issue Jul 12, 2024 · 17 comments · May be fixed by #49
Assignees
Labels
enhancement New feature or request

Comments

@DevilsAutumn
Copy link
Member

Makefile has some commands as of now but it can improved to prevent running multiple commands to setup and run project project locally. Improvements should be done such that one or two command should be able to install all deps, build both frontend backend, and run both frontend and backend without docker. Something like make frontend and make backend would work.

@DevilsAutumn DevilsAutumn added the enhancement New feature or request label Jul 12, 2024
@SureshPradhana
Copy link
Contributor

hello @DevilsAutumn can you assign me on this?

@DevilsAutumn
Copy link
Member Author

Done @SureshPradhana , thanks for picking up this.

@SureshPradhana
Copy link
Contributor

@DevilsAutumn Does this need to connect to and run all backend services similar to Docker?

@DevilsAutumn
Copy link
Member Author

@DevilsAutumn Does this need to connect to and run all backend services similar to Docker?

yeah, kind of.

@SureshPradhana
Copy link
Contributor

SureshPradhana commented Jul 23, 2024

should i use docker containers for postgres and rabbitmq inside makefile

@DevilsAutumn
Copy link
Member Author

DevilsAutumn commented Jul 26, 2024

should i use docker containers for postgres and rabbitmq inside makefile

No, terminal commands should be used. Also no need to use postgres for if we're running without docker.

@SureshPradhana
Copy link
Contributor

Should the Makefile be written assuming that postgres and rabbitmq are already manually set up?

@DevilsAutumn
Copy link
Member Author

we are using sqlite instead of postgres for setup without docker. I dont think it would require some kind of check before starting the application(not sure).

@SureshPradhana
Copy link
Contributor

I will change the Makefile to only run the backend; RabbitMQ and other services will need to be run manually.

@SureshPradhana
Copy link
Contributor

can do something like this

# RabbitMQ commands
check-rabbitmq:
	@if ! sudo service rabbitmq-server status | grep -q "active (running)"; then \
		echo "RabbitMQ is not installed or not running. Please install and start RabbitMQ service."; \
		exit 1; \
	fi

start-rabbitmq:
	sudo service rabbitmq-server start

stop-rabbitmq:
	sudo service rabbitmq-server stop

@DevilsAutumn
Copy link
Member Author

Can we run the start-rabbitmq command under run backend command in makefile itself?

@SureshPradhana
Copy link
Contributor

Yes, but it may throw error for everyone who run make backend and requires to setup rabbitmq even for someone who is not working on rabbitmq

@DevilsAutumn
Copy link
Member Author

DevilsAutumn commented Jul 27, 2024

ok lets keep them independent for now.

@SureshPradhana
Copy link
Contributor

@DevilsAutumn If we don't use Docker and instead rely only on a Makefile, we have to manage it based on different OSes, each of which has different ways of starting RabbitMQ. I think it's better to start services manually or use Docker, as using a Makefile will require managing differences across various OSes.

@DevilsAutumn
Copy link
Member Author

DevilsAutumn commented Jul 28, 2024

hmm makes sense. Probably we should change this issue to improve the docs related to setting up the project on local for different OSes, along with some additional commands for frontend in makefile. What do you think?

@SureshPradhana
Copy link
Contributor

SureshPradhana commented Jul 28, 2024

improving the docs would be very beneficial, and I believe the Makefile should only be used to run the frontend and backend.
i'll update the docs and make changes so make frontend runs the frontend, make backend installs dependencies and runs the Django server, and any additional services are manually installed and started.

@DevilsAutumn
Copy link
Member Author

Perfect. Thankyou.

@DevilsAutumn DevilsAutumn changed the title Improve makefile to improve local setup Improve makefile and docs to simplify project setup without docker Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants