UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Verified Commit 0ad928d3 authored by Patrick Tafoya's avatar Patrick Tafoya
Browse files

BULL-3225-better-startup - Updates to readme to reflect changes to project...

BULL-3225-better-startup - Updates to readme to reflect changes to project startup and to clean up details throughout.
parent a35a3a8d
No related branches found
No related tags found
1 merge request!11BULL-3225-better-startup
# xx_project_name_xx-local-dev
## Quickstart
# 🛞 First Time Setup 🛞
***
### Update `/etc/hosts` file
## 1. Update `/etc/hosts` file
Due to the new (as of March 2024) bigbang.mil DNS changes, you must add entries into your /etc/hosts file so that requests to fiesta-wagon-ingress get properly routed to your local machine.
```aiignore
You must add entries into your /etc/hosts file so that requests to fiesta-wagon-ingress get properly routed to your local machine.
```text
# add fiesta-wagon-ingress entries to /etc/hosts
127.0.0.1 users.dev.bigbang.mil
127.0.0.1 xx_project_name_xx.dev.bigbang.mil
```
Next, grant execute permissions on the startup.sh file and run the setup script.
## 2. Linux users only❗...
```shell
chmod +x ./scripts/setup.sh
bash ./scripts/setup.sh
On Linux, Docker containers typically run as the root user by default. When containers create or modify files on mounted volumes, these files may be owned by root on the host system, making it difficult for the current user to manage these files or directories.
Fiesta Wagon avoids this by configuring containers with mounted volumes to use UID and GID of `1000` which is typically the first non-root user. To override this and ensure these files and folders are created as the current user, it is recommended that Linux export their UID (User ID) and GID (Group ID) as environment variables. This ensures that any files or directories created by the container are owned by the current user, preventing any issues.
### Here’s how:
#### **Option 1: Update Your Shell Initialization File (One-Time Setup)**
To ensure your UID and GID are available to all Fiesta Wagon projects without additional steps:
- Add `export UID=$(id -u)` and `export GID=$(id -g)` to either your `~/.bashrc` or `~/.zshrc` as appropriate.
Or easier:
- Either, Run this for Bash:
```shell
# run these to update your bashrc file
echo 'export UID=$(id -u)' >> ~/.bashrc
echo 'export GID=$(id -g)' >> ~/.bashrc
# run this to apply changes to the current session.
source ~/.bashr
```
- Or, Run this for Zsh:
```shell
# run these to update your zsh file
echo 'export UID=$(id -u)' >> ~/.zshrc
echo 'export GID=$(id -g)' >> ~/.zshrc
# run this to apply changes to the current session.
source ~/.zshrc
```
#### **Option 2: Export UID and GID in Each Session**
If you prefer not to modify your shell configuration, you can manually export these values in each terminal session. Be sure to do this in each terminal session before using docker-compose to ensure the container inherits your user permissions.
``` shell
export UID=$(id -u)
export GID=$(id -g)
```
### Project-specific setup
If your backend uses node.js, run `npm install` in the xx_project_name_xx-api directory next.
### Startup
# 🛞 Running the project 🛞
***
You can start all containers in your project with this one command.
```sh
# start all the xx_project_name_xx components
docker compose up
```
Access the xx_project_name_xx UI at https://xx_project_name_xx.dev.bigbang.mil
Access the xx_project_name_xx API Docs at https://xx_project_name_xx.dev.bigbang.mil/api/docs
# 🛞 View your project 🛞
***
### Create a user
Once your containers are up and running, you can access them by:
- Access the xx_project_name_xx UI at https://xx_project_name_xx.dev.bigbang.mil
- Access the xx_project_name_xx API Docs at https://xx_project_name_xx.dev.bigbang.mil/api/docs
`xx_project_name_xx-local-dev` uses Fiesta Wagon Ingress, meaning that you can configure local user JWTs from https://users.dev.bigbang.mil/
# 🛞 Create and manage users 🛞
***
`xx_project_name_xx-local-dev` uses Fiesta Wagon Users to emulate Keycloak, meaning that you can configure local user JWTs that will be automatically attached to all traffic to your containers.
- Create and manage users here: https://users.dev.bigbang.mil/
To grant a local user admin permissions, modify the user's JWT to include the following `group-full` attribute:
......@@ -46,3 +89,4 @@ To grant a local user admin permissions, modify the user's JWT to include the fo
]
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment