From f0a61285a6877a0df132b3c305f23aebca7b9db8 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Tue, 14 Sep 2021 19:01:06 +0530 Subject: [PATCH] docs: Fat container documentation fixes (#7207) Added additional details about how to use the fat container, and how to manage / maintain it. Also includes some refactorings that shouldn't affect the functionality significantly. --- Dockerfile | 16 +- deploy/{fat_container => docker}/.gitignore | 0 deploy/docker/README.md | 176 ++++++++++++++++++ .../docker-compose.yml | 5 +- .../{fat_container => docker}/entrypoint.sh | 5 +- .../images/appsmith_supervisord_ui.png | Bin .../scripts/renew-certificate.sh | 0 .../templates/cron.d/renew-certificate | 0 .../templates/docker.env.sh | 0 .../templates/mongo-init.js.sh | 0 .../templates/nginx_app.conf.sh | 0 .../templates/supervisord.conf | 0 .../application_process/backend.conf | 0 .../supervisord/application_process/cron.conf | 0 .../application_process/editor.conf | 0 .../supervisord/application_process/rts.conf | 0 .../templates/supervisord/mongodb.conf | 0 .../templates/supervisord/redis.conf | 0 .../utils/.gitignore | 0 deploy/docker/utils/bin/constants.js | 12 ++ .../utils/bin/export_db.js | 12 +- .../utils/bin/import_db.js | 10 +- .../utils/bin/index.js | 0 .../utils/bin/utils.js | 0 .../utils/package-lock.json | 0 .../utils/package.json | 4 +- deploy/fat_container/README.md | 104 ----------- 27 files changed, 215 insertions(+), 129 deletions(-) rename deploy/{fat_container => docker}/.gitignore (100%) create mode 100644 deploy/docker/README.md rename deploy/{fat_container => docker}/docker-compose.yml (92%) rename deploy/{fat_container => docker}/entrypoint.sh (97%) rename deploy/{fat_container => docker}/images/appsmith_supervisord_ui.png (100%) rename deploy/{fat_container => docker}/scripts/renew-certificate.sh (100%) rename deploy/{fat_container => docker}/templates/cron.d/renew-certificate (100%) rename deploy/{fat_container => docker}/templates/docker.env.sh (100%) rename deploy/{fat_container => docker}/templates/mongo-init.js.sh (100%) rename deploy/{fat_container => docker}/templates/nginx_app.conf.sh (100%) rename deploy/{fat_container => docker}/templates/supervisord.conf (100%) rename deploy/{fat_container => docker}/templates/supervisord/application_process/backend.conf (100%) rename deploy/{fat_container => docker}/templates/supervisord/application_process/cron.conf (100%) rename deploy/{fat_container => docker}/templates/supervisord/application_process/editor.conf (100%) rename deploy/{fat_container => docker}/templates/supervisord/application_process/rts.conf (100%) rename deploy/{fat_container => docker}/templates/supervisord/mongodb.conf (100%) rename deploy/{fat_container => docker}/templates/supervisord/redis.conf (100%) rename deploy/{fat_container => docker}/utils/.gitignore (100%) create mode 100644 deploy/docker/utils/bin/constants.js rename deploy/{fat_container => docker}/utils/bin/export_db.js (89%) rename deploy/{fat_container => docker}/utils/bin/import_db.js (86%) rename deploy/{fat_container => docker}/utils/bin/index.js (100%) rename deploy/{fat_container => docker}/utils/bin/utils.js (100%) rename deploy/{fat_container => docker}/utils/package-lock.json (100%) rename deploy/{fat_container => docker}/utils/package.json (85%) delete mode 100644 deploy/fat_container/README.md diff --git a/Dockerfile b/Dockerfile index 290e3f9738..55cec30927 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ # Install MongoDB v4.0.5, Redis - Service Layer RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - RUN echo "deb [ arch=amd64,arm64 ]http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list \ - && apt-get remove wget -y + && apt-get remove wget -y # Install node v14 - Service Layer RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \ @@ -58,21 +58,21 @@ COPY ./app/rts/package.json ./app/rts/dist/* rts/ COPY ./app/rts/node_modules rts/node_modules # Nginx & MongoDB config template - Configuration layer -COPY ./deploy/fat_container/templates/nginx_app.conf.sh ./deploy/fat_container/templates/mongo-init.js.sh ./deploy/fat_container/templates/docker.env.sh templates/ +COPY ./deploy/docker/templates/nginx_app.conf.sh ./deploy/docker/templates/mongo-init.js.sh ./deploy/docker/templates/docker.env.sh templates/ # Add bootstrapfile -COPY ./deploy/fat_container/entrypoint.sh ./deploy/fat_container/scripts/* ./ +COPY ./deploy/docker/entrypoint.sh ./deploy/docker/scripts/* ./ # Add uitl tools -COPY ./deploy/fat_container/utils ./utils +COPY ./deploy/docker/utils ./utils RUN cd ./utils && npm install && npm install -g . # Add process config to be run by supervisord -COPY ./deploy/fat_container/templates/supervisord.conf /etc/supervisor/supervisord.conf -COPY ./deploy/fat_container/templates/supervisord/ templates/supervisord/ +COPY ./deploy/docker/templates/supervisord.conf /etc/supervisor/supervisord.conf +COPY ./deploy/docker/templates/supervisord/ templates/supervisord/ # Add defined cron job -COPY ./deploy/fat_container/templates/cron.d /etc/cron.d/ +COPY ./deploy/docker/templates/cron.d /etc/cron.d/ RUN chmod 0644 /etc/cron.d/* RUN chmod +x entrypoint.sh renew-certificate.sh @@ -84,4 +84,4 @@ EXPOSE 80 EXPOSE 443 EXPOSE 9001 ENTRYPOINT [ "/opt/appsmith/entrypoint.sh" ] -CMD ["/usr/bin/supervisord" ,"-n"] \ No newline at end of file +CMD ["/usr/bin/supervisord", "-n"] diff --git a/deploy/fat_container/.gitignore b/deploy/docker/.gitignore similarity index 100% rename from deploy/fat_container/.gitignore rename to deploy/docker/.gitignore diff --git a/deploy/docker/README.md b/deploy/docker/README.md new file mode 100644 index 0000000000..f43f0872e3 --- /dev/null +++ b/deploy/docker/README.md @@ -0,0 +1,176 @@ +# Appsmith Docker Image + +The Appsmith Docker image is built with all the components required for it to run, within a single Docker container. Files in this directory make up for the scripts and template files needed for building the image. + +You may choose to use the Appsmith cloud instance (at [app.appsmith.com](https://app.appsmith.com)) or start your own using this image. + +## Appsmith Cloud + +The fastest way to get started with appsmith is using our cloud-hosted version. It's as easy as + +1. [Create an Account](https://app.appsmith.com/user/signup) +2. [Docs on Building a UI](https://docs.appsmith.com/core-concepts/dynamic-ui) + +## Self Host + +The following subsections describe how you can get started with _your own_ instance of Appsmith. + +### 1. Prerequisites + +Ensure `docker` and `docker-compose` are installed and available for starting containers: + +- Install Docker: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/) +- Install Docker Compose: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/) + +You may verify the installation by running `docker --version` and `docker-compose --version`. The output should roughly be something like below: + +```sh +$ docker --version +Docker version 20.10.7, build f0df350 +$ docker-compose --version +docker-compose version 1.29.2, build 5becea4c +``` + +### 2. Docker compose configuration + +Create a folder called `appsmith` (or some other name that you like), which will serve as our installation folder. Inside this folder, create a `docker-compose.yml` file and copy the following content into it: + +```yaml +version: "3" + +services: + appsmith: + image: appsmith/appsmith-ce + container_name: appsmith-ce + ports: + - "80:80" + - "443:443" + - "9001:9001" + volumes: + - ./stacks:/appsmith-stacks + labels: + com.centurylinklabs.watchtower.enable: "true" + + auto_update: + image: containrrr/watchtower:latest-dev + volumes: + - /var/run/docker.sock:/var/run/docker.sock + # Update check interval in seconds. + command: --interval 300 --label-enable --cleanup +``` + +After saving this file, `cd` to the folder that contains this file and run the following command to start Appsmith: + +```sh +docker-compose up -d +``` + +This command may take a few minutes to download the docker image and initialize the application. Appsmith should soon be available at . + +You can check if application is running correctly by running `docker ps` or `docker-compose ps` (running `docker-compose` will require you to be in the directory containing the `docker-compose.yml` file to work). + +```sh +$ docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +3b8f2c9638d0 appsmith/appsmith "/opt/appsmith/entrypoint.sh" 17 minutes ago Up 17 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp appsmith +``` + +You can also use the Supervisord UI to monitor and manage the different processes _inside_ the container. This is discussed [further below](#supervisord). + +## Custom Domain + +To make Appsmith available on a custom domain, please update your domain's DNS records to point to the instance running Appsmith. Most domain registrars / DNS-providers have documentation on how you can do this yourself. + +* [GoDaddy](https://in.godaddy.com/help/create-a-subdomain-4080) +* [Amazon Route 53](https://aws.amazon.com/premiumsupport/knowledge-center/create-subdomain-route-53/) +* [Digital Ocean](https://www.digitalocean.com/docs/networking/dns/how-to/add-subdomain/) +* [NameCheap](https://www.namecheap.com/support/knowledgebase/article.aspx/9776/2237/how-to-create-a-subdomain-for-my-domain) +* [Domain.com](https://www.domain.com/help/article/domain-management-how-to-update-subdomains) + +## Instance Management Utilities + +The image includes an `appsmithctl` command to help with the management and maintenance of your instance. The following subsections describe what's available. + +### Export database + +The following command can be used to take a backup dump of Appsmith's database. This can be restored onto another instance using the import command (discussed below) to restore all data. + +Before running this, ensure you are in the directory where `docker-compose.yml` is located. + +```sh +docker-compose exec appsmith-ce appsmithctl export_db +``` + +The output file will be stored in the container directory `/appsmith-stacks/data/backup/appsmith-data.archive`. Thanks to the volume configuration in the `docker-compose.yml` file, it should be available on your host machine at `./stacks/data/backup/appsmith-data.archive`. + +If your volume configuration is different or unavailable, you can use the following command to copy the archive file to your host disk: + +```sh +docker-compose cp appsmith-ce:/appsmith-stacks/data/backup/appsmith-data.archive . +``` + +Note that you may want to save the `docker.env` file in addition to this archive file, if you intend to be able to reproduce this environment elsewhere, or in case of a disaster. This file can be copied out of the container with the following command: + +```sh +docker-compose cp appsmith-ce:/appsmith-stacks/configuration/docker.env . +``` + +**Be sure to keep this file safe**, since it contains information that can be used to decrypt datasource information from the database archive. + +### Import database + +The following command can restore backup archive, that was produced by the export command (discussed above). + +First, copy the archive file into the container using the following command: + +```sh +docker-compose cp ./appsmith-data.archive appsmith-ce:/appsmith-stacks/data/restore/ +``` + +Second, run the following command to import data from this file: + +```sh +docker-compose exec appsmith-ce appsmithctl import_db +``` + +Note that when you restore, you may also want to copy a `docker.env` from the original instance into this one. You can use the following command to do this (assuming you are in the installation folder and `docker.env` exists in the same folder): + +```sh +docker-compose cp ./docker.env appsmith-ce:/appsmith-stacks/configuration/ +``` + +This will need a restart of the Appsmith server, which can be done using the following command: + +```sh +docker-compose exec appsmith-ce supervisorctl restart backend +``` + +## Supervisor + +The container runs multiple processes, including the Appsmith server, Nginx, MongoDB etc., inside a single Docker container. These processes are started and managed by [supervisord](http://supervisord.org/). + +Supervisord comes with a web interface for managing the various processes, available at , as well as a command line interface towards the same goal. + +Here's a screenshot of the web interface listing all the processes managed: + +

+ +

+ +The command line interface can also be used to perform operations like restarting the Appsmith server, or restarting Nginx etc. For example, the following command (run in the installation folder) can be used to get a status of all running processes: + +```sh +docker-compose exec appsmith-ce supervisorctl status +``` + +Or to view the last few lines of stderr output of one of the processes: + +```sh +docker-compose exec appsmith-ce supervisorctl tail backend stderr +``` + +To learn more, please refer to [Supervisor's documentation](http://supervisord.org/running.html#supervisorctl-actions) on what actions are available to be performed by the command line interface. + +## Troubleshooting + +If you encounter any errors during this process, please reach out to [**support@appsmith.com**](mailto:support@appsmith.com) or join our [Discord Server](https://discord.com/invite/rBTTVJp) and reach out on the #support channel. diff --git a/deploy/fat_container/docker-compose.yml b/deploy/docker/docker-compose.yml similarity index 92% rename from deploy/fat_container/docker-compose.yml rename to deploy/docker/docker-compose.yml index f181872afe..e59830cb5e 100644 --- a/deploy/fat_container/docker-compose.yml +++ b/deploy/docker/docker-compose.yml @@ -1,15 +1,18 @@ version: "3" + services: + appsmith: build: context: ../../ - container_name: appsmith_fat + container_name: appsmith ports: - "80:80" - "443:443" - "9001:9001" volumes: - ./stacks:/appsmith-stacks + auto_update: image: containrrr/watchtower volumes: diff --git a/deploy/fat_container/entrypoint.sh b/deploy/docker/entrypoint.sh similarity index 97% rename from deploy/fat_container/entrypoint.sh rename to deploy/docker/entrypoint.sh index e35d2b89e0..95dad9765e 100755 --- a/deploy/fat_container/entrypoint.sh +++ b/deploy/docker/entrypoint.sh @@ -194,5 +194,8 @@ init_mongodb configure_ssl configure_supervisord +# Ensure the restore path exists in the container, so an archive can be copied to it, if need be. +mkdir -p /appsmith-stacks/data/{backup,restore} + # Handle CMD command -exec "$@" \ No newline at end of file +exec "$@" diff --git a/deploy/fat_container/images/appsmith_supervisord_ui.png b/deploy/docker/images/appsmith_supervisord_ui.png similarity index 100% rename from deploy/fat_container/images/appsmith_supervisord_ui.png rename to deploy/docker/images/appsmith_supervisord_ui.png diff --git a/deploy/fat_container/scripts/renew-certificate.sh b/deploy/docker/scripts/renew-certificate.sh similarity index 100% rename from deploy/fat_container/scripts/renew-certificate.sh rename to deploy/docker/scripts/renew-certificate.sh diff --git a/deploy/fat_container/templates/cron.d/renew-certificate b/deploy/docker/templates/cron.d/renew-certificate similarity index 100% rename from deploy/fat_container/templates/cron.d/renew-certificate rename to deploy/docker/templates/cron.d/renew-certificate diff --git a/deploy/fat_container/templates/docker.env.sh b/deploy/docker/templates/docker.env.sh similarity index 100% rename from deploy/fat_container/templates/docker.env.sh rename to deploy/docker/templates/docker.env.sh diff --git a/deploy/fat_container/templates/mongo-init.js.sh b/deploy/docker/templates/mongo-init.js.sh similarity index 100% rename from deploy/fat_container/templates/mongo-init.js.sh rename to deploy/docker/templates/mongo-init.js.sh diff --git a/deploy/fat_container/templates/nginx_app.conf.sh b/deploy/docker/templates/nginx_app.conf.sh similarity index 100% rename from deploy/fat_container/templates/nginx_app.conf.sh rename to deploy/docker/templates/nginx_app.conf.sh diff --git a/deploy/fat_container/templates/supervisord.conf b/deploy/docker/templates/supervisord.conf similarity index 100% rename from deploy/fat_container/templates/supervisord.conf rename to deploy/docker/templates/supervisord.conf diff --git a/deploy/fat_container/templates/supervisord/application_process/backend.conf b/deploy/docker/templates/supervisord/application_process/backend.conf similarity index 100% rename from deploy/fat_container/templates/supervisord/application_process/backend.conf rename to deploy/docker/templates/supervisord/application_process/backend.conf diff --git a/deploy/fat_container/templates/supervisord/application_process/cron.conf b/deploy/docker/templates/supervisord/application_process/cron.conf similarity index 100% rename from deploy/fat_container/templates/supervisord/application_process/cron.conf rename to deploy/docker/templates/supervisord/application_process/cron.conf diff --git a/deploy/fat_container/templates/supervisord/application_process/editor.conf b/deploy/docker/templates/supervisord/application_process/editor.conf similarity index 100% rename from deploy/fat_container/templates/supervisord/application_process/editor.conf rename to deploy/docker/templates/supervisord/application_process/editor.conf diff --git a/deploy/fat_container/templates/supervisord/application_process/rts.conf b/deploy/docker/templates/supervisord/application_process/rts.conf similarity index 100% rename from deploy/fat_container/templates/supervisord/application_process/rts.conf rename to deploy/docker/templates/supervisord/application_process/rts.conf diff --git a/deploy/fat_container/templates/supervisord/mongodb.conf b/deploy/docker/templates/supervisord/mongodb.conf similarity index 100% rename from deploy/fat_container/templates/supervisord/mongodb.conf rename to deploy/docker/templates/supervisord/mongodb.conf diff --git a/deploy/fat_container/templates/supervisord/redis.conf b/deploy/docker/templates/supervisord/redis.conf similarity index 100% rename from deploy/fat_container/templates/supervisord/redis.conf rename to deploy/docker/templates/supervisord/redis.conf diff --git a/deploy/fat_container/utils/.gitignore b/deploy/docker/utils/.gitignore similarity index 100% rename from deploy/fat_container/utils/.gitignore rename to deploy/docker/utils/.gitignore diff --git a/deploy/docker/utils/bin/constants.js b/deploy/docker/utils/bin/constants.js new file mode 100644 index 0000000000..d876b70ccb --- /dev/null +++ b/deploy/docker/utils/bin/constants.js @@ -0,0 +1,12 @@ + +const BACKUP_PATH = "/appsmith-stacks/data/backup" + +const RESTORE_PATH = "/appsmith-stacks/data/restore" + +const DUMP_FILE_NAME = "appsmith-data.archive" + +module.exports = { + BACKUP_PATH, + RESTORE_PATH, + DUMP_FILE_NAME, +} diff --git a/deploy/fat_container/utils/bin/export_db.js b/deploy/docker/utils/bin/export_db.js similarity index 89% rename from deploy/fat_container/utils/bin/export_db.js rename to deploy/docker/utils/bin/export_db.js index fd705740d5..24f111d85f 100644 --- a/deploy/fat_container/utils/bin/export_db.js +++ b/deploy/docker/utils/bin/export_db.js @@ -1,13 +1,11 @@ // Init function export mongodb -var shell = require('shelljs') - -// Load env configuration -const BACKUP_PATH = '/appsmith-stacks/data/backup' +const shell = require('shelljs') +const Constants = require('./constants') function export_database() { console.log('export_database ....') - shell.mkdir('-p', [`${BACKUP_PATH}`]); - const cmd = `mongodump --uri='${process.env.APPSMITH_MONGODB_URI}' --archive=${BACKUP_PATH}/data.archive --gzip` + shell.mkdir('-p', [Constants.BACKUP_PATH]); + const cmd = `mongodump --uri='${process.env.APPSMITH_MONGODB_URI}' --archive='${Constants.BACKUP_PATH}/${Constants.DUMP_FILE_NAME}' --gzip` shell.exec(cmd) console.log('export_database done') } @@ -58,4 +56,4 @@ function main() { module.exports = { runExportDatabase: main -}; \ No newline at end of file +}; diff --git a/deploy/fat_container/utils/bin/import_db.js b/deploy/docker/utils/bin/import_db.js similarity index 86% rename from deploy/fat_container/utils/bin/import_db.js rename to deploy/docker/utils/bin/import_db.js index 8770b66eaa..f023b5990e 100644 --- a/deploy/fat_container/utils/bin/import_db.js +++ b/deploy/docker/utils/bin/import_db.js @@ -1,12 +1,10 @@ // Init function export mongodb -var shell = require('shelljs') - -// Load env configuration -const RESTORE_PATH = '/appsmith-stacks/data/restore' +const shell = require('shelljs') +const Constants = require('./constants') function import_database() { console.log('import_database ....') - const cmd = `mongorestore --uri='${process.env.APPSMITH_MONGODB_URI}' --gzip --archive=${RESTORE_PATH}/data.archive` + const cmd = `mongorestore --uri='${process.env.APPSMITH_MONGODB_URI}' --archive='${Constants.RESTORE_PATH}/${Constants.DUMP_FILE_NAME}' --gzip` shell.exec(cmd) console.log('import_database done') } @@ -46,4 +44,4 @@ function main() { module.exports = { runImportDatabase: main -}; \ No newline at end of file +}; diff --git a/deploy/fat_container/utils/bin/index.js b/deploy/docker/utils/bin/index.js similarity index 100% rename from deploy/fat_container/utils/bin/index.js rename to deploy/docker/utils/bin/index.js diff --git a/deploy/fat_container/utils/bin/utils.js b/deploy/docker/utils/bin/utils.js similarity index 100% rename from deploy/fat_container/utils/bin/utils.js rename to deploy/docker/utils/bin/utils.js diff --git a/deploy/fat_container/utils/package-lock.json b/deploy/docker/utils/package-lock.json similarity index 100% rename from deploy/fat_container/utils/package-lock.json rename to deploy/docker/utils/package-lock.json diff --git a/deploy/fat_container/utils/package.json b/deploy/docker/utils/package.json similarity index 85% rename from deploy/fat_container/utils/package.json rename to deploy/docker/utils/package.json index f49c5d54f2..bb31978ee3 100644 --- a/deploy/fat_container/utils/package.json +++ b/deploy/docker/utils/package.json @@ -9,7 +9,7 @@ "repository": { "type": "git", "url": "https://github.com/appsmithorg/appsmith.git", - "directory": "deploy/fat_container" + "directory": "deploy/docker" }, "dependencies": { "boxen": "^5.0.1", @@ -19,6 +19,6 @@ "yargs": "^17.1.1" }, "bin": { - "appsmith": "./bin/index.js" + "appsmithctl": "./bin/index.js" } } diff --git a/deploy/fat_container/README.md b/deploy/fat_container/README.md deleted file mode 100644 index 179aab96c5..0000000000 --- a/deploy/fat_container/README.md +++ /dev/null @@ -1,104 +0,0 @@ - -# I. Getting started -You can begin using appsmith via our cloud instance or by deploying appsmith yourself - -* [Using Appsmith Cloud](quick-start.md#appsmith-cloud) **\(recommended\):** Create a new application with just one click -* [Using Docker](quick-start.md#docker): Deploy anywhere using docker - -## Appsmith Cloud - -The fastest way to get started with appsmith is using our cloud-hosted version. It's as easy as - -1. [Create an Account](https://app.appsmith.com/user/signup) -2. [Start Building](core-concepts/building-the-ui/) - -# II. Setup Appsmith use fat container -## 1. Prerequisites -- Ensure `docker` and `docker-compose` is installed and currently running: - - Install Docker: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/) - - Install Docker Compose: [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/) -## 2. Step to setup -- 1. Create `docker-compose.yaml` and copy the following content into it -``` -version: "3" -services: - appsmith: - image: appsmith_fat - container_name: appsmith_fat - ports: - - "80:80" - - "443:443" - - "9001:9001" - volumes: - - ./stacks:/appsmith-stacks - auto_update: - image: containrrr/watchtower - volumes: - - /var/run/docker.sock:/var/run/docker.sock - # Update check interval in seconds. - command: --interval 300 --label-enable --cleanup -``` -2. Start application -``` -docker-compose up -d -``` -- It takes several minutes to pull the docker image and initialize the application -3. Check if application running correctly. -``` -docker ps -#Output should look like this -CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -3b8f2c9638d0 appsmith/appsmith "/opt/appsmith/entrypoint.sh" 17 minutes ago Up 17 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp appsmith -``` -## 3. Custom Domain & Config application -To host Appsmith on a custom domain, you can contact your domain registrar and update your DNS records. Most domain registrars have documentation on how you can do this yourself. - -* [GoDaddy](https://in.godaddy.com/help/create-a-subdomain-4080) -* [Amazon Route 53](https://aws.amazon.com/premiumsupport/knowledge-center/create-subdomain-route-53/) -* [Digital Ocean](https://www.digitalocean.com/docs/networking/dns/how-to/add-subdomain/) -* [NameCheap](https://www.namecheap.com/support/knowledgebase/article.aspx/9776/2237/how-to-create-a-subdomain-for-my-domain) -* [Domain.com](https://www.domain.com/help/article/domain-management-how-to-update-subdomains) - -Then, you can update your custom domain from the application's configuration UI -## 4. Instance Management Utilities -> Fat container provide some utils to support you easy to maintenance application -### 4.1 Export database -Our container also supports exporting data from the internal database for backup or reuse purpose - -Export the internal database (You can use command `docker ps` to check the name or the ID of container) -``` -docker exec appsmith_fat appsmith export_db -``` -The output file will be stored in mounted directory `/data/backup/data.archive` - -In case of you have changed the mounted point in the docker-compose file, please change the prefix `./deploy/fat_container/stacks` to the correct one - -Now, you can use this output file as a backup or as a migration file -### 4.2 Import database -It is also available to import data from another database into application's internal database - -First of all, you need to copy or move the gzip file to the container's mounted folder `/data/restore/data.archive` -(*Note: file name must be `data.archive` to ensure the absolute path works as expected*) - -Or you can copy directly to the running container using `docker cp` command -``` -docker cp appsmith_fat:/appsmith-stacks/data/restore -``` - -Then, simply run following command to import data to internal database -``` -docker exec appsmith_fat appsmith import_db -``` -### 4.3 Supervisord UI -To manage the application's processes using supervisord, you can use the supervisord UI - -You can use the browser to access port `9001` of the host (`http://localhost:9001` if you run the container on your local machine) -

- -

- -In this UI, you can manage your application's process. You should stop application's service (MongoDB, Redis) in case of using external service -## Troubleshooting -If at any time you encounter an error during the installation process, reach out to **support@appsmith.com** or join our [Discord Server](https://discord.com/invite/rBTTVJp) - -If you know the error and would like to reinstall Appsmith, simply delete the installation folder and the templates folder and execute the script again