- Introduction
- Development
- Composer commands
- Building & Using the docker container
- Kindly Supported by
- Sponsor this project
This is the backend of Shoutz0r, consisting of both the API and the Worker.
Built using Laravel, GraphQL (Lighthouse) & Apollo.
API Docs can be found over at shoutzor.com.
Documentation has yet to be written. Feel free to ask any questions in the discussions.
The steps listed below assume you have PHP installed locally and are using a linux-based workspace environment.
- Open your
.envfile- Set
APP_KEY: Runphp artisan key:generate --showand put the generated output here - change
DB_HOSTto127.0.0.1(there's a known-issue wherelocalhostwill cause the connection to fail) - change
REDIS_HOSTto127.0.0.1orlocalhost
- Set
- Run
docker compose -f docker-compose.yml -f docker-compose.dev.yml up mysql redisand wait for MySQL to become ready. - Run
composer installto install all dependencies of thebackend.- If you already did this before, you can skip this step.
- In a separate terminal run
composer install-shoutzor-dev.- If you want to reinstall shoutzor, you can run
composer fresh-install-shoutzor-devinstead
(⚠️ WARNING⚠️ This will drop ALL TABLES!)
- If you want to reinstall shoutzor, you can run
- If the installation completes, open your
.envand change:DB_HOSTback tomysqlREDIS_HOSTback toredis
- You can now go back to the running
docker composecommand and hitCTRL + Cto shut down those containers.
To start the full backend, you can now run docker compose -f docker compose.yml -f docker compose.dev.yml up
-
Building the images might take a while
-
This will start all required services for the
backendandworkerto function. After those have started, thebackendandworkerwill be started too. -
The
backendandworkerwill be watching for changes and restart automatically. -
For production environments you can run
docker compose upinstead. (Assuming Shoutz0r has been installed)
| Command | Explanation |
|---|---|
composer install-shoutzor |
Installs shoutzor for production environments |
composer fresh-install-shoutzor |
|
composer install-shoutzor-dev |
Installs shoutzor for development environments (adds mock data) |
composer fresh-install-shoutzor-dev |
|
composer add-mock-data |
Generates and adds mock data to the database using DevelopmentSeeder |
Shoutz0r is being developed entirely in my spare time.
If you like this project, please consider sponsoring it using the button in the sidebar of this repo (or click here ).
Every little bit helps to buy me a beer or pizza, which keeps me going!