All the contributions are welcome in Modulector project, please reads all the considerations. If you want to make a production deploy please read the DEPLOYING.md document.
The entire contributing process consists in the following steps:
- Fork the repository.
- Make a new branch.
- Make your changes in that branch and push to your fork version.
- Make a Pull Request in Github from your fork's branch to our master branch in the official repository.
- That's all!
- The entire deploy was configured to be simple from the tool Docker Compose. So you need to install:
- Python 3.8+
- Create a Python's virtualenv to install the dependencies. In the project's root folder:
python3 -m venv venv
source venv/bin/activate
(this command must be run every time you want to start the Django server, otherwise we won't have the dependencies available)pip install -r config/requirements.txt
- Fill the DB. Follow the instructions in the DEPLOYING document.
- (Optional) create a super-user to work with the Django admin panel:
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py createsuperuser
(now you can access to <URL:port>/admin)
- (Optional) create a super-user to work with the Django admin panel:
- Start up the DB (PostgreSQL) service running:
docker compose -f docker-compose.dev.yml up -d
- This will start the DBMS service and an Adminer instance in the URL
http://127.0.0.1:8080
where you can enter the db and see its structure. - To stop all the service just run
docker compose -f docker-compose.dev.yml down
- This will start the DBMS service and an Adminer instance in the URL
- Start Django's development server:
- In the project's root folder and with the virtualenv active, run:
python3 manage.py runserver
. The site will be available in http://127.0.0.1:8000/.
- In the project's root folder and with the virtualenv active, run:
We use gitlab environment git workflow. The default branch is dev
and the publishing branch is main
. The working branches are created from dev
and must respect the following steps and actions:
- A new branch is created from
dev
. - After finish working with it, a PR to
dev
must be created. - Automatic Action/Workflow for PR is executed.
- The new branch is merged to
dev
. - Automatic Action/Workflow for Push events into
dev
is executed. - When is ready to publish a new version of
dev
, a PR tomain
is created. - These Action/Workflow are executed:
- PR.
- Version checker (to avoid overwrite an existing image on Docker Hub repository).
dev
is merged intomain
.- Automatic Action/Workflow for Push events into
main
is executed to build a new Docker image for Modulector and publish it.