Getting Started#
This repository is the full-stack for Exact Systems, Inc and is used to create the various components.
Current Application Needs
Dependencies#
MetaCRUD2 is dependent on make, bash, and Docker. Please ensure a reasonably recent version of Docker is available. Note: Follow Docker installation instructions provided by Docker for Debian and complete post-install scripts to make Docker available to non-root users for consistent results.
Git#
The main branch is used as a main stable branch. dev branch is to be used for development. feature branches are used to develop individual pieces.
Feature branches should be named according to the current scope of work as found within the agenda section of the repository. i.e. “scope3”.
Clone Repository#
Make a local directory if it does not exist for repositories within your user directory according to best practice location:
mkdir -p ~/RepositoriesNavigate to the local directory for repositories within your user directory:
cd ~/RepositoriesClone the metacrud2 repository from the server to your local repositories directory on the dev branch:
git clone --branch dev git@git.systems.exact.engineering:/git/metacrud2Change to the metacrud2 directory:
cd ./metacrud2
Listing remote feature branches#
git ls-remote
Listing local feature branches#
git branch -a
Creating a new feature branch#
If the current scope of work does not have a branch yet either locally or remotely, create it using the following steps:
Fetch the most recent version of the dev branch(does not automatically merge like a pull command would):
git fetch origin devCreate a new feature branch based on the dev branch regardless of what branch you are currently on(Use this convention but change the scope number to whichever one is currently applicable):
git checkout -b scope3 devPush the newly created remote branch to the origin server:
git push origin scope3
Check current branch and status#
Before committing, it is a good idea to confirm the current branch and pending changes to be made in upcooming steps:
git status
Committing to braches#
Commit by adding a single file(
git add newFile) or all uncommitted changes(git add .)Commit changes that have been added to local branch:
git commit -m "Added new file"
Pushing a feature branch#
Ensure the most recent remote branch is incorporated into the local branch to minimize potential conflicts:
git pull origin scope3Push changes within local branch to remote server:
git push origin scope3
Merging a feature branch#
Check current branch status to confirm all changes are committed:
git statusFetch the most recent changes from the dev branch to your local machine:
git fetch origin devSwitch to the dev branch on your local machine:
git checkout devMerge your existing featuree scope into the dev branch:
git merge scope3
Delete a local branch#
Check the status of the branch for uncommitted changes:
git statusPush the local branch to the server to preservee all changes:
git push origin scope3Delete the local branch:
git branch --delete scope3
Resources#
Documentation#
Documentation is primarily located within the ./docs directory.
References#
Starting the Development Environment#
The packaging of MetaCRUD2 uses docker to ensure a consistent development and compiling environment is readily and consistently available.
To get started with an interactive docker container that will automatically connect you to bash within the container, run the following command: make dev-env-interactive. Please note, a variation is available if sudo rights are required: make dev-env-interactive.
To end the development environment session, type exit
To clean the residuals of this environment and nothing else, exit the session and enter make dev-env-clean.
Start the server application#
Once within the development environment, run metacrud2.
Documentation Site#
Documentation will be automatically compiled in the development environment and made available at the documentation site.
User Interface#
The user interface will be automatically compiled and made available here.
Database#
The database will be available via the following command within the container:
psql -h localhost -U metacrud -d metacrud
This refers to the user “metacrud” and the databas “metacrud”.