Skip to content

Latest commit

 

History

History
119 lines (88 loc) · 3.45 KB

installation.md

File metadata and controls

119 lines (88 loc) · 3.45 KB

Get required apps

bench get-app erpnext --branch version-14
bench get-app https://github.com/alyf-de/eu_einvoice --branch version-14

Set up CORS

To allow the Angelatlas web-apps to access the API, add the following to sites/common_site_config.json:

{
 "..." : "...",
 "allow_cors": [
  "https://angelatlas.devid.net",
  "https://www.angelatlas-sachsen.de",
  "https://angelatlas-sachsen.de"
 ]
}

Also, for embedding static (uploaded) files and icons, we need to modify the nginx configuration in config/nginx.conf

# Define the variable $cors_origin to be the value of the header "Origin" if it
# matches one of the allowed origins, otherwise empty.
map $http_origin $cors_origin {
    default "";
    https://www.angelatlas-sachsen.de $http_origin;
    https://angelatlas-sachsen.de $http_origin;
    https://angelatlas.devid.net $http_origin;
}

server {
    ...

    location / {
        rewrite ^(.+)/$ $1 permanent;
        rewrite ^(.+)/index\.html$ $1 permanent;
        rewrite ^(.+)\.html$ $1 permanent;

        # Allow CORS for static files
        add_header Access-Control-Allow-Origin $cors_origin;
        add_header Access-Control-Allow-Methods "GET, OPTIONS";

        location ~* ^/files/.*.(htm|html|svg|xml) {
            add_header Content-disposition "attachment";

            # Allow CORS again, specifically for the above filetypes
            add_header Access-Control-Allow-Origin $cors_origin;
            add_header Access-Control-Allow-Methods "GET, OPTIONS";

            try_files /$site_name_eqzecbv/public/$uri @webserver;
        }

        try_files /$site_name_eqzecbv/public/$uri @webserver;
    }

    ...
}

Increase the file size limit

The default file size limit is 10MB. To allow larger file uploads (e.g. 25MB), add the following to sites/common_site_config.json:

{
    "..." : "...",
    "max_file_size": 26214400
}

1. Create a site

bench new-site [site-name] --install-app erpnext --install-app eu_einvoice

2. Complete the setup wizard

Open the browser and complete the setup wizard, for example with the following values:

Field Value Comment
Language English
Your Country Germany
Domains Non Profit (beta)
Company Name Landesverband Sächsischer Angler
Company Abbreviation LV
What does it do? Landesverband Sächsischer Angler
Bank Name Default Bank Account
Chart of Accounts Standard with Numbers

3. Install landa

ERPNext must be already installed and the setup wizard completed before installing landa.

bench get-app https://github.com/alyf-de/landa
bench --site [site-name] install-app landa
bench --site [site-name] migrate # currently necessary to get the "Member Count" chart

Reinstallation (developers only)

Warning: all site data will get deleted by the following commands

  1. Uninstall landa and reinstall the site

    bench --site [site-name] uninstall-app landa
    bench --site [site-name] reinstall
  2. Open your browser and complete the setup wizard, as described above.

  3. Install landa, as described above.