An easy system to organize yours and your coworkers lunch orders.
git clone https://github.com/robjuz/futtertrog.git
composer install
cp .env.example .env
- edit
.env
- setup webserver
docker run --rm robjuz/futtertrog php artisan key:gen --show
Remember to set APP_KEY generated in previous step
Please also set you APP_URL and SMTP credentials
version: '3'
services:
futtertrog:
image: robjuz/futtertrog
ports:
- 80:80
depends_on:
- db
environment:
APP_NAME: Futtertrog
APP_KEY: <APP_KEY>
APP_URL: <APP_URL>
DB_CONNECTION: mysql
DB_HOST: db
DB_DATABASE: futtertrog
DB_USERNAME: futtertrog
DB_PASSWORD: futtertrog
MAIL_DRIVER: smtp
MAIL_HOST: <MAIL_HOST>
MAIL_PORT: 2525
MAIL_USERNAME: <MAIL_USER>
MAIL_PASSWORD: <MAIL_PASSWORD>
MAIL_ENCRYPTION: null
HOLZKE_LOGIN:
HOLZKE_PASSWORD:
HOLZKE_SCHEDULE: "false"
STARTUP_COMMAND_1: sleep 10 && php artisan migrate --force
CRON_SCHEDULE_1: "* * * * *"
CRON_COMMAND_1: php artisan schedule:run
db:
image: mysql:5.7
environment:
MYSQL_DATABASE: futtertrog
MYSQL_USER: futtertrog
MYSQL_PASSWORD: futtertrog
MYSQL_RANDOM_ROOT_PASSWORD: 1
volumes:
- mysql:/var/lib/mysql
volumes:
mysql:
You could use nginx as reverse proxy and certbot to manage you certificate
The system currently support 3 providers
Provider | Prices | Auto ordering |
---|---|---|
Holzke | yes | yes |
Call A Pizza | no | no |
Manuall | no | no |
To import all available menus for the incoming days run:
php artisan import:holzke
If you with to also import prices please set you Holzke credentials in .env
file
HOLZKE_LOGIN:
HOLZKE_PASSWORD:
If you with to automatically get available menus, set in .env
file
HOLZKE_SCHEDULE: "true"
Set you location using the CALL_A_PIZZA_LOCATION
variable in .env
file
To obtain the local key
- Visit https://www.call-a-pizza.de
- Enter you postcode
- Get the location key from the url. ex.
dresden_loebtau_sued
You can use gitlab as OAuth provider
- go to GitLab -> Applications and create a new App
- set
LOGIN_WITH_GITLAB=true
GITLAB_CLIENT_ID=
GITLAB_CLIENT_SECRET=
GITLAB_URL=
in .env
file
You can use Nexmo to send SMS notifications to admin users
to enable general debugging logs, set the APP_DEBUG=true
in the .env
file
composer install
cp .env.example .env
- set you DATABASE credentials in the
.env
file
After first install you need to generate the APP_KEY
php artisan key:gen
php artisan serve
Visit https://localhost:8000 in your browser
docker-compose pull
docker-compose up -d
After first install you need to generate the APP_KEY
docker-compose exec futtertrog cp .env.example .env
docker-compose exec futtertrog php artisan key:gen
Visit https://localhost:8080 in your browser
You can see your mails using MailHog under localhost:8025
vendor/bin/phpunit --configuration ./phpunit.xml
- Go to PHP settings and set default interpreter to the futtertrog service.
- In the Lifecycle option select "Connect to existing container"
docker-compose up -d
Now you can run phpunit with the ide
php artisan db:seed
or
docker-compose exec futtertrog php artisan db:seed
Will create a [email protected]
user with 123456
password. You can change this password in the app.