-
Notifications
You must be signed in to change notification settings - Fork 27
chore: updated documentation with working video setup and sso guide #24
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
Open
Saksham-Sirohi
wants to merge
6
commits into
fossasia:main
Choose a base branch
from
Saksham-Sirohi:new-documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2942bb8
chore: updated documentation with working video setup and sso guide
Saksham-Sirohi 18f3455
prerequisite check and remove existing personal if it exists
Saksham-Sirohi 505b38e
added migration command for eventyay-video
Saksham-Sirohi 0163e67
labelled specific steps for development purpose
Saksham-Sirohi 46bb65b
Added mac specific fixes to documentation
Saksham-Sirohi 25cf7e0
wsl change
Saksham-Sirohi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
# Setting Up a Development Environment for EventYay Components | ||
# Setting Up a Working Environment for EventYay Components | ||
|
||
This guide will help you set up the complete app.eventyay.com system locally for development using Docker. | ||
This guide will help you set up the complete app.eventyay.com system using Docker. | ||
|
||
## Prerequisites | ||
|
||
- Docker (May require installation if not already done)/Install Docker Desktop on MacOS enable rosetta translation in docker if on arm | ||
- Docker Compose | ||
- Docker (May require installation if not already done) / Install Docker Desktop on MacOS enable rosetta translation in docker if on arm / WSL integration to be used when using on Windows | ||
- Docker Compose (Alternatively docker-compose can be used but requires editing command) | ||
- Docker buildx | ||
- NPM/Node (May require installation if not already done) on MacOS you can install it with homebrew | ||
- git | ||
- git(ssh setup required) | ||
- arch[i386(x86_64) as eventyay video npm install causes issues on arm based systems; use rosetta on mac] | ||
|
||
**Check whether pre-requisites are installed on your system** | ||
|
||
```bash | ||
docker version | ||
docker buildx version | ||
docker compose version | ||
npm -v | ||
node -v | ||
ssh -T [email protected] | ||
arch | ||
``` | ||
|
||
if any of these fail please check and install missing prerequisites before going further | ||
|
||
## Video Tutorial | ||
|
||
|
@@ -16,27 +32,28 @@ For visual guidance, you can watch the EventYay Setup tutorial for FOSSASIA Summ | |
|
||
## Initial Setup | ||
|
||
### 1. Prepare Your Work Directory | ||
### 1. Prepare Your Working Directory | ||
|
||
First, set up a work directory where all development will happen: | ||
First, set up a working directory where all development will happen: | ||
|
||
```bash | ||
# Define your work directory replace eventyay-dev with name of your preference | ||
# Define your working directory replace eventyay-dev with name of your preference | ||
export WORKDIR=~/eventyay-dev | ||
mkdir -p $WORKDIR | ||
cd $WORKDIR | ||
``` | ||
|
||
> **Note on Environment:** For optimal performance, use Ubuntu 22.04 LTS or newer(Prefer LTS as some latest builds are causing some issue with docker) , or macOS. Windows Subsystem for Linux (WSL) may cause issues with Docker networking and file permissions. | ||
|
||
> **If you're on MacOS use terminal with rosetta to avoid arm specific errors if any, you can do this by checking open using rosetta this can be found in Applications/Utilities right-click terminal and select get info you will find the option there after enabling quit and restart terminal** | ||
|
||
### 2. Clone Repositories | ||
|
||
Clone all the required repositories: | ||
|
||
```bash | ||
# Define GitHub paths | ||
FOSSASIA_GITHUB=https://github.com/fossasia | ||
[email protected]:<YOUR_GITHUB_USERNAME> | ||
|
||
# Clone all FOSSASIA repos | ||
git clone $FOSSASIA_GITHUB/eventyay-docker | ||
|
@@ -45,12 +62,15 @@ git clone $FOSSASIA_GITHUB/eventyay-tickets | |
git clone $FOSSASIA_GITHUB/eventyay-video | ||
``` | ||
|
||
> **Note:** Forking repositories is optional but recommended if you plan to contribute. If you've forked the repositories, you can add your personal clone as a remote: | ||
> **Note:** Forking repositories is optional but recommended if you plan to contribute. If you've forked the repositories, you can add your personal clone as a remote **(Only for Development)** : | ||
> | ||
> ```bash | ||
> # from the for loop you can remove repositories that you haven't forked for development | ||
> # from the for loop you can remove repositories that you havent forked for development also remember to add your github username | ||
> [email protected]:<YOUR_GITHUB_USERNAME> | ||
> for repo in eventyay-talk eventyay-tickets eventyay-video eventyay-docker; do | ||
> cd $WORKDIR/$repo | ||
> # this will remove old personal remote you can remove this if needed | ||
> git remote remove personal 2>/dev/null || true | ||
Saksham-Sirohi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
> git remote add personal $PERSONAL_GITHUB/$repo.git | ||
> git fetch personal | ||
> cd $WORKDIR | ||
|
@@ -61,7 +81,7 @@ All checked out repos (except eventyay-docker) should default to the `developmen | |
|
||
## Building and Configuration | ||
|
||
### 1. Build Development-Oriented Images | ||
### 1. Build Docker Images | ||
|
||
```bash | ||
# From your $WORKDIR | ||
|
@@ -73,10 +93,7 @@ cd .. | |
|
||
### 2. Set Up EventYay Video | ||
|
||
The video webapp needs node modules etc installed and build. | ||
This is done in during the docker image build step, but since | ||
we mount the checked out eventyay-video directory into the | ||
container, the built-in directory with node-modules etc is hidden. | ||
The video webapp needs node modules etc installed and build. This is done in during the docker image build step, but since we mount the checked out eventyay-video directory into the container, the built-in directory with node-modules etc is hidden. If doing this on mac make sure rosetta is used by terminal you can confirm this by using arch this should be i386 | ||
|
||
```bash | ||
cd eventyay-video/webapp | ||
|
@@ -122,7 +139,7 @@ grep -qxF "127.0.0.1 video.eventyay.com" /etc/hosts || echo "127.0.0.1 video.e | |
|
||
Alternatively, you can change all hostnames in the configuration files in `docker-compose.yaml` and `config/**`. | ||
|
||
**->WSL users should run an elevated command prompt in order to add entries to windows hosts:** | ||
**->WSL users should run command prompt in order to add entries to Windows hosts:** | ||
|
||
``` | ||
findstr /C:"127.0.0.1 app.eventyay.com" %SystemRoot%\System32\drivers\etc\hosts >nul 2>&1 && echo Already exists: app.eventyay.com || (echo 127.0.0.1 app.eventyay.com>>%SystemRoot%\System32\drivers\etc\hosts && echo Added: app.eventyay.com) | ||
|
@@ -141,11 +158,12 @@ sudo dpkg -i google-chrome-stable_current_amd64.deb | |
``` | ||
|
||
Chrome in WSL can be accessed by (if installed inside WSL): | ||
|
||
``` | ||
google-chrome app.eventyay.com | ||
``` | ||
|
||
## Launching the Application | ||
## Launching the Application (Ensure you are in eventyay-docker for this the whole time) | ||
|
||
### 1. Start the Containers | ||
|
||
|
@@ -155,7 +173,7 @@ docker compose -f docker-compose-dev.yml up -d | |
|
||
### 2. Initial User Setup | ||
|
||
⚠️ **Critical:** Use identical email address and password for both the pretix and pretalx superusers. The systems are integrated and rely on matching credentials. Avoid root access as it can cause configuration issues. | ||
⚠️ **Critical:** Use identical email address and password for all the superusers. The systems are integrated and rely on matching credentials. Avoid root access as it can cause configuration issues. | ||
|
||
### Create ticket superuser in the eventyay-ticket container | ||
|
||
|
@@ -187,18 +205,72 @@ docker exec -ti eventyay-talk bash | |
> | ||
> ```bash | ||
> # Initialize talk system with a superuser account | ||
> cd ~ | ||
> pretalx init | ||
> # Type 'exit' when finished to return to your host terminal | ||
> exit | ||
> ``` | ||
|
||
### Create video superuser for the eventyay-video container | ||
|
||
> ```bash | ||
> # Initialize video system with a superuser account | ||
> docker exec -it eventyay-video python3 manage.py migrate | ||
> docker exec -it eventyay-video python3 manage.py import_config sample/worlds/sample.json | ||
> docker exec -it eventyay-video python3 manage.py createsuperuser | ||
> ``` | ||
|
||
**Change the port number from 8443 to 8375 in config.js (Only for Local Development Setup)** | ||
|
||
> ```bash | ||
> # Initialize video system with correct config ensure you are in eventyay-docker directory | ||
> CONFIG_FILE="../eventyay-video/webapp/config.js" | ||
> OLD_PORT="8443" | ||
> NEW_PORT="8375" | ||
> if [[ ! -f "$CONFIG_FILE" ]]; then | ||
> echo "File not found: $CONFIG_FILE" | ||
> exit 1 | ||
> fi | ||
> if grep -q "$OLD_PORT" "$CONFIG_FILE"; then | ||
> if [[ "$OSTYPE" == darwin* ]]; then | ||
> # macOS | ||
> sed -i '' "s/$OLD_PORT/$NEW_PORT/g" "$CONFIG_FILE" | ||
> else | ||
> # Linux | ||
> sed -i "s/$OLD_PORT/$NEW_PORT/g" "$CONFIG_FILE" | ||
> fi | ||
> echo "Port changed from $OLD_PORT to $NEW_PORT in $CONFIG_FILE" | ||
> else | ||
> echo "Port $OLD_PORT not found in $CONFIG_FILE. No changes made." | ||
> fi | ||
> ``` | ||
|
||
## Accessing the System | ||
|
||
Visit `https://app.eventyay.com/tickets/` and log in with the user/password you defined above. | ||
Visit `https://app.eventyay.com/tickets/login` and log in with the user/password you defined above. | ||
|
||
## Setting Up SSO entry | ||
|
||
Upon successful login turn on admin mode in the menu with your email go to admin under global settings in the side menu navigate to generate keys for sso use this redirect URL `https://app.eventyay.com/talk/oauth2/callback/` | ||
|
||
```bash | ||
# Execute this command in your host terminal to enter the talk container | ||
docker exec -ti eventyay-talk bash | ||
``` | ||
|
||
> Once inside the container, run: | ||
> | ||
> ```bash | ||
> # Initialize talk system with a superuser account | ||
> cd src | ||
> ./manage.py create_social_apps | ||
> # Type 'exit' when finished to return to your host terminal | ||
> exit | ||
> ``` | ||
|
||
After logging in to tickets, you should be able to go to `https://app.eventyay.com/talk/`, click on the login text, and get automatically logged in. | ||
|
||
In order to access to access eventyay-video go to `http://app.eventyay.com:8002/control` **(Only for Local Development)** otherwise go to `http://app.eventyay.com/video` | ||
|
||
## Development Workflow | ||
|
||
- Changes to Python code and templates should be reflected immediately in the docker containers and visible in the browser after container reload, if not immediately. | ||
|
@@ -213,4 +285,4 @@ If you encounter issues with the login or connections between services, ensure: | |
3. You've properly initialized both the ticket and talk systems with identical credentials. | ||
4. If using Windows WSL, consider switching to a native Ubuntu 22.04+ installation for better Docker compatibility. | ||
5. Docker networking can sometimes be problematic with WSL - if you experience connectivity issues, try restarting the Docker service. | ||
6. If you are having problem with user creation due to data directory permissions it is highly likely that you have done something wrong in step 3 of building and configuration. | ||
6. If you are having problem with user creation due to data directory permissions it is highly likely that you have done something wrong in step 3 of building and configuration. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.