- Server with shell access and cronjobs
- Webserver - Nginx or Apache
- PHP => 8.1
- PHP intl extension INTL_ICU_VERSION >= 50.1
- PHP bzip2 lib (for automatic database backups) (prior to v3.6: PHP ZipArchive class)
- MySQL >= 8.0
- If you cloned the repository from Github: Node.js, npm >= v7 and Composer v2
We strongly recommend using our docker dev environment.
- If you want to set up a dev environment, clone from Github.
- After that, you need to manually install composer and npm vendors.
- The main branch always equals the latest stable version provided on https://www.foodcoopshop.com/download.
- The only difference is, that the zip file already includes the vendors which were already installed by the following commands):
$ composer install $ npm --prefix ./webroot install ./webroot
- So run that commands if you cloned from Github.
- Don’t forget to change app.debug to true in your custom_config.php.
- Download the latest stable version at https://www.foodcoopshop.com/download and upload the unpacked files to your server using FTP.
- Webserver configuration
If you install a version prior to v3.6, run the commands in this file.
- Copy custom_config.default.php to custom_config.php and add your configuration overrides.
- The default configuration is found in app_config.php.
app.cakeServerNameto your server, e.g. “https://yourdomain.tld” - NO TRAILING SLASH!
app.cakeServerNamewas changed to
- Some configuration is stored in the database and can easily be changed from the admin area: https://yourdomain.tld/admin/configurations (Super Admin account required)
- More infos
- Create a new database (e.g. foodcoopshop_db)
- Define your database configuration in custom_config.php
bash ./devtools/installation/init-database.sh de_DE(locale “en_US” is also supported)
- Import taxes for Austria:
bash ./bin/cake migrations seed --seed AddTaxesAustriaSeed
- OR Import taxes for Germany:
bash ./bin/cake migrations seed --seed AddTaxesGermanySeed
- Copy credentials.default.php to credentials.php and change the configuration
- The email error logging can be enabled to ease server monitoring
- Be aware that you need to set
'EmailTransport' => [...]twice, once in
credentials.phpand once in
custom_config.php. There must be an EmailTransport config-block for the keys “default” and “debug” so the configs must not stay commented!
- See https://book.cakephp.org/4/en/core-libraries/email.html#configuring-transports
- Once you created a Super Admin account (instructions further down), You can test your email configuration by accessing https://yourdomain.tld/admin/configurations/sendTestEmail in your browser.
Open your domain https://yourdomain.tld in a browser and follow the steps shown to create secure values for the security salt
Security.salt. Set it in custom_config.php
- Open https://yourdomain.tld/sign-in in your browser and register with your personal email address (down below at “Create account”)
- After the successful registration go to your database (e.g. using Adminer or phpMyAdmin) and open the table “fcs_customer”. There is one record (with your email address). Change the field “id_default_group” from 3 to 5 and the field “active” from 0 to 1.
- Open https://yourdomain.tld/request-new-password, type in your email address and press “Send”.
- With the password that was sent to you by email you are able to login as a Super Admin.
The urls in this section depend on the locale of your installation and therefore may be different for you. The urls are constructed from translatio -settings which can be found in the “/resources/locale/country_CULTURE/default.po” file under the keys “route_sign_in” and “route_request_new_password”. Example for “de_DE”:
- Sign-in: https://yourdomain.tld/anmelden
- Request-new-password: https://yourdomain.tld/neues-passwort-anfordern
Follow the steps of the cronjob documentation.
- Change app.debug to
truein your custom_config.php so that the assets (css and js) are loaded from the actual files in /css and /js (and not from /cache).
- To re-build the assets in /cache for production, run
Good luck and thank you for using FoodCoopShop!