- 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
.env
file- Set
APP_KEY
: Runphp artisan key:generate --show
and put the generated output here - change
DB_HOST
to127.0.0.1
(there's a known-issue wherelocalhost
will cause the connection to fail) - change
REDIS_HOST
to127.0.0.1
orlocalhost
- Set
- Run
docker compose -f docker-compose.yml -f docker-compose.dev.yml up mysql redis
and wait for MySQL to become ready. - Run
composer install
to 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-dev
instead
(⚠️ WARNING⚠️ This will drop ALL TABLES!)
- If you want to reinstall shoutzor, you can run
- If the installation completes, open your
.env
and change:DB_HOST
back tomysql
REDIS_HOST
back toredis
- You can now go back to the running
docker compose
command and hitCTRL + C
to 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
backend
andworker
to function. After those have started, thebackend
andworker
will be started too. -
The
backend
andworker
will be watching for changes and restart automatically. -
For production environments you can run
docker compose up
instead. (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!