| Stable Branch | Develop Branch |
|---|---|
LANager is a web application designed to make LAN parties more enjoyable for attendees and organisers alike.
- Games being played - by your LAN's attendees, updated every minute from Steam
- Events timetable - so your attendees know what's on at the LAN
- Achievements - created by you and awarded to attendees
- Attendee profiles - with a link to their Steam profile, and their gameplay history at the LAN
- Games in common - when viewing another attendee's profile
- Games recently played - showing the top games most recently played by attendees at the LAN
- Slides - showing games attendees are currently playing, and current and upcoming events, for TVs or projectors around your venue
- Guides - written by you, to help attendees learn about things like venue facilities, rules, or gameplay guides
- Links - to other websites, such as your organisation's website, or a game statistics page
- Internet access
- Docker Compose
-
Clone the
lanager-docker-composeproject:git clone https://github.com/zeropingheroes/lanager-docker-compose
-
Copy
.env.exampleto a new file named.env:cd lanager-docker-compose cp .env.example .env -
Generate and copy a new application key:
docker run --rm --entrypoint php -w /app zeropingheroes/lanager artisan key:generate --show
-
Open the environment configuration file in a text editor:
nano .env
-
Set the following configuration items:
Environment variable Set to APP_KEYThe application key you generated above APP_URLThe URL you will access LANager through, without a trailing slash APP_TIMEZONEYour location's timezone STEAM_API_KEYYour Steam API Key DB_PASSWORDA randomly generated password DB_ROOT_PASSWORDA different randomly generated password If you will LANager behind a reverse proxy, set
TRUSTED_PROXIESto the IP ranges used by Docker, typically:172.16.0.0/12,192.168.0.0/16 -
Bring up the application:
docker compose up --detach --wait
-
Initialise the database:
./initialise-database.sh
LANager should now be accessible at http://localhost:8000, or at the URL you specified in APP_URL, providing you've
created a corresponding DNS A record for the Docker host's IP address, and allowed ports 80 and 443 through
the Docker host's firewall.
-
Enter the
lanager-docker-composerepository:cd lanager-docker-compose -
Back up your data:
./backup.sh
-
Get the latest version of the Docker compose files and scripts:
git pull
-
Run the update script:
./update.sh
- Follow the steps from the Update section above
- Run
./fix-permissions.shto fix permissions on thestoragedirectory - Run
docker exec -it lanager php artisan lanager:update-steam-apps - Run
docker exec -it lanager php artisan lanager:update-steam-user-apps - Run
docker exec -it lanager php artisan lanager:update-steam-user-app-images
To set up the LANager for your next LAN party, you need to create a LAN page, then add Events (such as scheduled games or lunch breaks) and Guides (such as game rules) to that LAN page.
The LANager assigns the "Super Admin" role to the first account that logs into it, so make sure you log in as soon as you have completed installation.
Super Admins can perform any action on the site, including assigning roles to other users.
The first thing you need to do is to create a LAN page in the LANager. This process is the same whether your LAN party is one day or multiple days. You need to do this before you can create an event schedule, publish any guides or award achievements.
Log into the LANager, and go to ⚙ > LANs, then select the + button to go to the LAN page creation form. Enter your LAN's details, and add a description with Markdown formatting if you want to.
The LANager automatically adds anyone who logs into the LANager during the LAN party to the LAN's list of attendees. For each attendee it displays the current LAN page, which contains the LAN's timetabled events, guides and attendees list.
Once you have a LAN page for your LAN party, you can create Events and Guides to help attendees enjoy your party.
- Events are a useful way to timetable game tournaments, highlight big game sessions, schedule breaks and mealtimes, and let people know when it's time to go home
- Guides are a useful way to provide people with the rules and download links to the games you're playing, to let them know where the nearest shops and restaurants are, to provide a code of conduct for your event, and to communicate any other information you think your guests might need.
From the LAN page, select the + button next to the Events and Guides headings to go to their creation forms.
You can use markdown-formatted links in LANs, guides and events. For example, you can write a single guide, and insert a link to it on several event pages:
If you need any help, please contact one of our [tournament staff](/lans/4/guides/3)
Where possible, it's good practice to use relative links as demonstrated above, so that if you change your domain, the links continue to work.
You can upload images to LAN pages, Events and Guides. To do this, follow these steps:
- Below the Description text box, select Upload images.
- Upload the image you want to use.
- Next to the image, select ⚙ > Copy Markdown
- Paste the Markdown into the guide, event or LAN's description field, in the location you want it to appear in the text.
The slides feature allows you to display a looping slideshow of live data and useful info for your attendees, such as which event is starting next, which games people are playing, and how to log into the LANager.
To display the slideshow, log in as an admin, and navigate to ⚙ > LANs > (your LAN) > Slides.
Load the slideshow on a big TV or projector so that attendees can see the info easily.
Select ⚙ > Achievements and then select the + button to create achievements that you can award to users.
To award an Achievement to an attendee, go to the navigation bar and select Achievements. This opens the list of Achievements you have awarded to attendees of the current LAN. At the bottom of the page, choose the Achievement and the attendee to award it to, then select Award.
Select ⚙ > Navigation to customise the links shown on the navigation bar. You can link to pages on the LANager or to third-party sites, organise the links into drop-down menus, and choose the order that the links appear in the navbar or dropdown.
Run ./backup.sh to back up LANager's configuration, database data and uploaded images.
Run ./backup-restore.sh <file> to restore a backup.
-
Follow the steps from the Setup section above
-
Stop the running containers
docker compose down
-
Check out the development branch of
lanager-docker-composecd lanager-docker-compose git checkout develop -
Edit
lanager-docker-compose/.envand add the following lines:APP_ENV=local APP_DEBUG=true
-
In a directory outside of
lanager-docker-compose, clone thelanagerrepository:git clone --branch develop https://github.com/zeropingheroes/lanager
-
Install
composeron your host computer -
From the
lanagerdirectory, install composer dependencies:composer install --no-scripts
-
Set an environment variable with the path to where you cloned the
lanagerrepository (without a trailing slash)export PATH_TO_LANAGER=/path/to/lanager -
From the
lanager-docker-composedirectory, runenvsubstto substitute in the path to lanager into the override compose file:envsubst < compose.override.yaml.example > compose.override.yaml
-
Set the correct permissions for the
storageandbootstrap/cachedirectories:chmod -R 777 "$PATH_TO_LANAGER/storage" "$PATH_TO_LANAGER/bootstrap/cache"
-
Create a symbolic link from the app storage directory into the public directory:
ln -s "$PATH_TO_LANAGER/storage/app/public" "$PATH_TO_LANAGER/public/storage"
-
Use
nodejsto build the static assets:docker run -it --rm --name npm-build -v "$PWD":/usr/src/app -w /usr/src/app node:22 npm clean-install docker run -it --rm --name npm-build -v "$PWD":/usr/src/app -w /usr/src/app node:22 npm cache clean --force docker run -it --rm --name npm-build -v "$PWD":/usr/src/app -w /usr/src/app node:22 npm run build
-
Start the containers
docker compose up --detach
-
After a minute or so, visit
http://localhost:8080
The container will run the code from your host computer, rather than the static copy of the code in the container's
image. Any changes you make to the files in the project directory (except for the storage/ directory)
will be seen by the running containers.
To stop the development environment run docker compose stop.
When you're ready to start developing again run docker compose start.
To destroy the development environment and all volumes that store lanager data, run:
docker compose down --volumesFollow the setup steps above to get a fresh development environment.
To recompile JavaScript & CSS assets, from the lanager directory, run:
docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm installdocker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm run dev
To recompile whenever changes to files are detected, run:
docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm run watch-poll
To recompile minified versions suitable for committing, run:
docker run -it --rm -v "$PWD":/var/www/html -w /var/www/html node:14-alpine npm run prod
Before submitting pull requests, please run the functional test suite to check your changes don't break existing functionality.
Run docker exec -it lanager php artisan dusk to run LANager's browser test suite.
- Found a bug? Got a great feature idea? Post it to the issue tracker!
- Want to contribute?
- Fork the project and add the features you want to see.
- Work on new features / bug fixes in the issue tracker.
- If you're really hardcore, request commit access.
Enjoy using the LANager!