There are a number of helper scripts available. Most of them obey the
FS_INT env var. Default is
dev, you can also set it to
|Remove anything added by
|Run php composer
|Run webpack dev server for doing js dev (obsolete, included in
|Docker-compose with the correct options set for the environment
|Drop the database
|runs all fixing - code stuff (php)
|fix php code style, see php Code style
|defines functions needed in other scripts
|Create the database and run migrations
|runs all lintings scripts lint-...
|lints markdown files: prints errors etc. NOTE: Custom args must originate from
client/ directory (e.g.
../README.md for root file)
|lints php files: prints errors etc.
|Create directories that need to be present (called by other scripts)
mysql command in correct context:
./scripts/mysql foodsharing "select * from fs_foodsaver"
mysqldump command in correct context
|Shut down and clean up all containers
|Run seed scripts in
|Start everything, initializing anything if needed, see Setting things up
|Stop everything, but leave it configured see Setting things up
|Run test for the chat
|Run test for the client (JS)
|Run tests without recreating db (faster that test)
|Builds the static assets on change
docker-compose you can run various php-scripts, e.g.
./scripts/docker-compose run --rm --no-deps app php -f run.php Stats foodsaver
./scripts/docker-compose run --rm --no-deps app php -f run.php Stats betriebe
./scripts/docker-compose run --rm --no-deps app php -f run.php Stats bezirke
This runs the statistics scripts that are run nightly on the production server.
This can be necessary to test code concerning statistics since they are usually never run locally.
--rm removes the containers afterwards,
--no-deps lets docker not worry about any dependendent containers. This is often useful since they are often running already.