Migrated from GitLab wiki

rob
2026-06-29 09:04:40 +00:00
commit 0f17775460
+318
@@ -0,0 +1,318 @@
For running **eStack** locally on your MacBook machine, you should have the following software installed on your system.
- Homebrew
- Git
- Gitlab
- Docker
# Installing Git with Homebrew on macOS
[Homebrew](https://brew.sh/) is a popular package manager for macOS that makes it easy to install and update programs.
### Install Homebrew
If you don't already have Homebrew installed, paste the following command into your Terminal:
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Follow the on-screen prompts to complete the Homebrew setup.
### Install Git
`Git` is a code management and version control system. You must install `Git` before going forward. Normally it's very easy to install git on windows but in the case **eStack** you have to take care of specific settings, if this setting is not checked, then it will be difficult for you to run the application on the system.
- If you already have Git installed, paste the following command into your Terminal:
```bash
brew upgrade git
```
- Otherwise, install it:
```bash
brew install git
```
### 3. Verify the Installation
-Confirm Git was installed successfully by checking the version:
```bash
git --version
```
-You should see output similar to:
```
git version 2.x.x
```
# GitLab
**eStack** is configured for GitLab to manage its code and revisions. So one should ask @rob for GitLab credentials to access the project. Once you have your GitLab credentials then you can use https://git.estack.com to log into the GitLab to clone the project.
### Adding public SSH Key into GitLab
Before making any progress on GitLab such as fetching and pushing the code from GitLab, one should add his/her public ssh keys to the GitLab for hassle-free push/pull from GitLab.
- Open GitLab Account using https://git.estack.com
- Make sure Rob gives you access to the necessary projects
# SSH Key Setup on macOS
SSH keys provide a secure way to authenticate with remote servers and services like GitLab, GitHub, and remote hosts — without needing to enter a password each time.
---
## Step 1: Check for Existing SSH Keys
Before generating a new key, check if one already exists:
```bash
ls -al ~/.ssh
```
Look for files named `id_ed25519` / `id_ed25519.pub` or `id_rsa` / `id_rsa.pub`. If they exist, you can [skip to Step 3](#step-3-add-your-ssh-key-to-the-ssh-agent) and use your existing key.
---
## Step 2: Generate a New SSH Key
Run the following command, replacing the email with your own:
```bash
ssh-keygen -t ed25519 -C "your_email@example.com"
```
> **Note:** If you're on an older system that doesn't support Ed25519, use RSA instead:
> ```bash
> ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
> ```
When prompted:
1. **Enter a file to save the key** — press `Enter` to accept the default location (`~/.ssh/id_ed25519`).
2. **Enter a passphrase** — recommended for added security. Press `Enter` twice to skip.
---
## Step 3: Add Your SSH Key to the SSH Agent
Start the SSH agent in the background:
```bash
eval "$(ssh-agent -s)"
```
Then add your private key to the agent:
```bash
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
```
> **Note:** The `--apple-use-keychain` flag stores your passphrase in the macOS Keychain so you don't have to re-enter it after a restart. If you used RSA, replace `id_ed25519` with `id_rsa`.
---
## Step 4: Copy Your Public Key
Your **public key** is what you share with remote services. Never share your private key.
Copy it to your clipboard with:
```bash
pbcopy < ~/.ssh/id_ed25519.pub
```
Or view it in the Terminal:
```bash
cat ~/.ssh/id_ed25519.pub
```
The output will look something like:
```
ssh-ed25519 AAAAC3Nza... your_email@example.com
```
---
## Step 5: Add the Public Key to GitLab
1. Go to **GitLab → Preferences → SSH Keys** (or visit https://git.estack.com/-/user_settings/ssh_keys.
2. Paste your public key into the **Key** field.
3. Give it a recognisable **Title** (e.g., `MacBook Pro - Work`).
4. Set an optional **Expiration date**.
5. Click **Add key**.
---
## Step 6: Test the Connection
Verify that GitLab can recognise your key:
```bash
ssh -T git@git.estack.com
```
On first connection, you may see:
```
The authenticity of host 'git.estack.com' can't be established.
Are you sure you want to continue connecting (yes/no)?
```
Type `yes`. A successful response looks like:
```
Welcome to GitLab, @username!
```
### Cloning of application
Next step in the row is cloning the code into your local machine. Run this command:
```bash
cd ~
git clone git@git.estack.com:jovanie/estack-laminas.git estack
```
# Install Docker
- Once cloning is done go into the estack folder using command
```bash
cd estack
```
enter command to install docker:
```bash
./install-docker-mac.sh
```
docker compose up -d
docker exec -it estack-php composer install
# GitLab Authentication with a Personal Access Token
When performing Git operations (clone, push, pull) over HTTPS, you may be prompted for credentials:
```
Authentication required (git.estack.com):
Username: jovanie
Password:
```
**Do not use your GitLab password here.** Instead, generate a Personal Access Token (PAT) and use that as your password.
---
## Step 1: Generate a Personal Access Token
1. Go to your Personal Access Tokens page:
[https://git.estack.com/-/user_settings/personal_access_tokens](https://git.estack.com/-/user_settings/personal_access_tokens)
2. Click **Add new token**.
3. Fill in the details:
- **Token name** — give it a recognisable name (e.g., `MacBook - Work`)
- **Expiration date** — set an appropriate expiry date
- **Scopes** — select **all scopes**
4. Click **Create personal access token**.
5. **Copy the token immediately** — it will not be shown again after you leave the page.
> **Tip:** Store the token somewhere safe such as a password manager.
---
## Step 2: Use the Token When Prompted
When Git asks for credentials, enter:
- **Username:** your GitLab username (e.g., `jovanie`)
- **Password:** paste your personal access token *(not your GitLab password)*
```
Authentication required (git.estack.com):
Username: jovanie
Password: <paste token here>
```
---
## Step 3: Store the Credentials
Do you want to store credentials for git.estack.com in /root/.composer/auth.json ? [Yn] Y
# Create Product Folder
```bash
mkdir public/images/products
```
# Add Host File
# Editing the Hosts File on macOS
The hosts file is a local system file that maps hostnames to IP addresses. Editing it lets you override DNS for specific domains — useful for local development, blocking sites, or testing environments before DNS propagates.
## Step 1: Open the Hosts File
The hosts file is located at `/etc/hosts` and requires elevated permissions to edit.
Open it with a Terminal text editor:
```bash
sudo nano /etc/hosts
```
You will be prompted for your macOS password.
---
## Step 2: Add a New Entry
Use the arrow keys to navigate to the bottom of the file, then add your entry:
```
127.0.0.1 cb.vm.estack.com
```
## Step 4: Save and Exit
In `nano`:
1. Press `Control + O` to write (save) the file.
2. Press `Enter` to confirm the filename.
3. Press `Control + X` to exit.
---
# Installing Databases
Download the following files
```
https://staging.estack.com/pms_cb.sql.gz
```
```
https://staging.estack.com/metapms.sql.gz
```
Name of the database file may change, you have to check that with the latest backup with @rob
Once you have this file downloaded, copy the files to your estack folder then you can execute the following command to import this file into the database.
```bash
gunzip -c metapms.sql.gz | docker compose exec -T mysql mariadb -u root -pt0m@dr3 metapms
```
```bash
gunzip -c pms_cb.sql.gz | docker compose exec -T mysql mariadb -u root -pt0m@dr3 pms_cb
```
This command will take some time, as this is going to execute all queries from the backup file against m `metapms` and `pms_cb` database.
Once this database file is imported, you are done.
Access on browser: https://cb.vm.estack.com:8443/