AppMaster applications can be deployed on-premise with a number of infrastructure steps.
Recommended on-premise infrastructure:
Server with Linux on Intel/AMD x64 CPU (Ubuntu LTS or any other modern). Additionally apps can be built for Windows and macOS , for arm or x32 for legacy systems.
PostgreSQL Database 14+, managed like AWS RDS recommended
S3-compatible storage (AWS recommended). Local files folder can be used as an alternative for test deployments, but not recommended.
nginx as reverse proxy to terminate TLS and route requests
NOTE. On-premise is available starting from Business subscription tier. Automatic provisioning, automated deploy and some specific options are available with Enterprise subscription only.
General Steps
Decide how you will host backend applications: by downloading binaries or using docker images (recommended).
If you prefer binaries, you can download them from Artifacts page and run them via systemd or supervisord.
To get access to the docker image registry reach our to our support team to get credentials.
Install nginx, for the most of debian-based distros: sudo apt install nginx
Authorize docker to the AppMaster Docker registry: docker login registry.appmaster.io
Go to the web UI of the registry https://registry.appmaster.io and get pull command for the build you need. Execute pull on your server, it should look like this: docker pull registry.appmaster.io/app_426371/app_426371@sha256:8b5a7d08c4077e88ad1688bafa52e970bfe09f0c50f9a887a05f977b4c7a3352
Prepare configuration file for your backend by adjusting template from the attachment with your DB/S3 credentials and ports if needed.
Run docker container: docker run -d -p 127.0.0.1:9895:9895-v /<your-folder/config.yaml:/app/config.yaml --restart unless-stopped <image>
Check that container is successfully started and running: docker ps -a
In a case of any issues try to check logs docker logs <container-name>
Download web application artifact from the Studio and unpack to the folder
Use nginx configuration sample from the attachment to adjust for your needs.
Important Moments
To serve web applications you must have HTTPS connection and any SSL certificate (even self-signed for testing).
To serve mobile applications you must have HTTPS and valid SSL certificate
Enable gzip, br, zstd in your nginx if supported for the optimal performance
Use CDN to cache static resources and protect application with WAF
For advanced users docker compose can be a preferred solution to manage containers
Where exactly should they be located and in what form?
I’ve tried several hypotheses and every time after deployment I get 404 on all web fronts at the same time mobile application works with api successfully, so the server works and the problem is with the front.
I described in detail everything I tried, and attached screens in a file, because when trying to send here I got an error that I can not upload more than 1 media:
What version of the web application do you use? v3 and not v4?
According to your screenshots you try to pack everything to the docker container. What are you trying to get? All web and mobile applications need to be served via http server like nginx/apache etc.
In your screenshot you have at lease 1 file from web v3 - appv3.json that your app tries to load from root location. If thats as intended try to add another location like /appv3.json and point alias to the exact location of the file to serve it.
Yes I tried to upload all the necessary files through docker. Seems I realized that might be the problem. I’ll try to upload the files directly to the server today.
So I need to specify a path like this in the config?
location /teacher {
alias /storage/web-app-16916_1430/appv3.json;
index index.html;
try_files $uri $uri/ index.html /index.html =404;
location /admin {
alias /storage/web-app-16915_1430/appv3.json;
index index.html;
try_files $uri $uri/ index.html /index.html =404;
Or like that?
location /teacher {
alias /storage/webapp-v3/web-app-16916_1430/appv3.json;
index index.html;
try_files $uri $uri/ index.html /index.html =404;
location /admin {
alias /storage/webapp-v3/web-app-16915_1430/appv3.json;
index index.html;
try_files $uri $uri/ index.html /index.html =404;
Initially from the example I thought that the path to the whole web folder was needed.