From e2f82f032ba1fdb28a1f796502e6c2ce39132813 Mon Sep 17 00:00:00 2001 From: AngeloAISquared Date: Mon, 7 Oct 2024 12:19:05 -0400 Subject: [PATCH 1/2] fix: updated docker-compose deployment file --- .../guides/setup/docker-compose-old.mdx | 143 ++++++++++++++ open-source/guides/setup/docker-compose.mdx | 184 ++++++------------ 2 files changed, 201 insertions(+), 126 deletions(-) create mode 100644 open-source/guides/setup/docker-compose-old.mdx diff --git a/open-source/guides/setup/docker-compose-old.mdx b/open-source/guides/setup/docker-compose-old.mdx new file mode 100644 index 0000000..aa9d9b2 --- /dev/null +++ b/open-source/guides/setup/docker-compose-old.mdx @@ -0,0 +1,143 @@ +--- +title: 'Docker' +description: 'Deploying Multiwoven using Docker' +--- + +Below steps will guide you through deploying Multiwoven on a server using Docker Compose. We require PostgreSQL database to store meta data for Multiwoven. We will use Docker Compose to deploy Multiwoven and PostgreSQL. + +Note: If you are setting up Multiwoven on your local machine, you can skip this section and refer to [Local Setup](/guides/setup/docker-compose-dev) section. + +## Prerequisites + +- [Docker](https://docs.docker.com/get-docker/) +- [Docker Compose](https://docs.docker.com/compose/install/) + + All our Docker images are available in x86_64 architecture, make sure your server supports x86_64 architecture. + +## Deployment options + +Multiwoven can be deployed using two different options for PostgreSQL database. + + + + + 1. Create a new directory for Multiwoven and navigate to it. + + ```bash + mkdir multiwoven + cd multiwoven + ``` + 2. Download the production `docker-compose.yml` file from the following link. + + ```bash + curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose.yaml + ``` + + 3. Download the `.env.production` file from the following link. + + ```bash + curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/.env.production + ``` + + 4. Rename the file .env.production to .env and update the environment variables if required. + + ```bash + mv .env.production .env + ``` + + 5. Start the Multiwoven using the following command. + + ```bash + docker-compose up -d + ``` + + 6. Stopping Multiwoven + + To stop the Multiwoven, use the following command. + + ```bash + docker-compose down + ``` + + 7. Upgrading Multiwoven + + When a new version of Multiwoven is released, you can upgrade the Multiwoven using the following command. + + ```bash + docker-compose pull && docker-compose up -d + ``` + Make sure to run the above command from the same directory where the `docker-compose.yml` file is present. + + + + + 1. Create a new directory for Multiwoven and navigate to it. + + ```bash + mkdir multiwoven + cd multiwoven + ``` + 2. Download the production `docker-compose.yml` file from the following link. + + ```bash + curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose-cloud-postgres.yaml + ``` + 3. Rename the file .env.production to .env and update the **PostgreSQL** environment variables. + + ```DB_HOST``` - Database Host + + ```DB_USERNAME``` - Database Username + + ```DB_PASSWORD``` - Database Password + + The default port for PostgreSQL is 5432. If you are using a different port, update the ```DB_PORT``` environment variable. + + ```bash + mv .env.production .env + ``` + + 4. Start the Multiwoven using the following command. + + ```bash + docker-compose up -d + ``` + + + +## Accessing Multiwoven + +Once the Multiwoven is up and running, you can access it using the following URL and port. + +Multiwoven Server URL: + +```http +http://:3000 +``` + +Multiwoven UI Service: + +```http +http://:8000 +``` + +If you are using a custom domain you can update the `API_HOST` and `UI_HOST` environment variable in the `.env` file. + +### Important considerations + +- Make sure to update the environment variables in the `.env` file before starting the Multiwoven. + +- Make sure to take regular **backups** of the PostgreSQL database. + +To restore the backup, you can use the following command. + +```bash +cat dump.sql | docker exec -i --user postgres psql -U postgres +``` + +- If you are using a custom domain, make sure to update the `API_HOST` and `UI_HOST` environment variables in the `.env` file. + + + + + + diff --git a/open-source/guides/setup/docker-compose.mdx b/open-source/guides/setup/docker-compose.mdx index aa9d9b2..f367877 100644 --- a/open-source/guides/setup/docker-compose.mdx +++ b/open-source/guides/setup/docker-compose.mdx @@ -1,143 +1,75 @@ --- -title: 'Docker' -description: 'Deploying Multiwoven using Docker' +title: 'Docker-Compose' +description: 'Deploying Multiwoven using Docker-Compose' --- -Below steps will guide you through deploying Multiwoven on a server using Docker Compose. We require PostgreSQL database to store meta data for Multiwoven. We will use Docker Compose to deploy Multiwoven and PostgreSQL. - -Note: If you are setting up Multiwoven on your local machine, you can skip this section and refer to [Local Setup](/guides/setup/docker-compose-dev) section. +The steps below will guide you through deploying Multiwoven using docker-compose. ## Prerequisites - +- [A Gmail account with an app password](https://support.google.com/accounts/answer/185833?hl=en) - [Docker](https://docs.docker.com/get-docker/) - [Docker Compose](https://docs.docker.com/compose/install/) All our Docker images are available in x86_64 architecture, make sure your server supports x86_64 architecture. -## Deployment options - -Multiwoven can be deployed using two different options for PostgreSQL database. - - - - - 1. Create a new directory for Multiwoven and navigate to it. - - ```bash - mkdir multiwoven - cd multiwoven - ``` - 2. Download the production `docker-compose.yml` file from the following link. - - ```bash - curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose.yaml - ``` - - 3. Download the `.env.production` file from the following link. - - ```bash - curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/.env.production - ``` - - 4. Rename the file .env.production to .env and update the environment variables if required. - - ```bash - mv .env.production .env - ``` - - 5. Start the Multiwoven using the following command. - - ```bash - docker-compose up -d - ``` - - 6. Stopping Multiwoven - - To stop the Multiwoven, use the following command. - - ```bash - docker-compose down - ``` - - 7. Upgrading Multiwoven - - When a new version of Multiwoven is released, you can upgrade the Multiwoven using the following command. - - ```bash - docker-compose pull && docker-compose up -d - ``` - Make sure to run the above command from the same directory where the `docker-compose.yml` file is present. - - - - - 1. Create a new directory for Multiwoven and navigate to it. - - ```bash - mkdir multiwoven - cd multiwoven - ``` - 2. Download the production `docker-compose.yml` file from the following link. - - ```bash - curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose-cloud-postgres.yaml - ``` - 3. Rename the file .env.production to .env and update the **PostgreSQL** environment variables. - - ```DB_HOST``` - Database Host - - ```DB_USERNAME``` - Database Username - - ```DB_PASSWORD``` - Database Password - - The default port for PostgreSQL is 5432. If you are using a different port, update the ```DB_PORT``` environment variable. - - ```bash - mv .env.production .env - ``` - - 4. Start the Multiwoven using the following command. - - ```bash - docker-compose up -d - ``` - - - -## Accessing Multiwoven - -Once the Multiwoven is up and running, you can access it using the following URL and port. - -Multiwoven Server URL: - -```http -http://:3000 +## Deployment Steps +1. On your VM or Local Machine, you will need to first create a directory for the Multiwoven deployment files. +```bash +mkdir mw +cd mw ``` - -Multiwoven UI Service: - -```http -http://:8000 +2. Create a self-signed certificate for psuedo-TLS and store them in a sub-directory named **certs**. Please use the command below and do not change the names of the cert and key files. +```bash +mkdir -p certs && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout certs/selfsigned.key -out certs/selfsigned.crt ``` +3. Download the Multiwoven docker-compose assets +```bash +# docker-compose.yaml +curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/docker-compose.yaml -If you are using a custom domain you can update the `API_HOST` and `UI_HOST` environment variable in the `.env` file. - -### Important considerations - -- Make sure to update the environment variables in the `.env` file before starting the Multiwoven. - -- Make sure to take regular **backups** of the PostgreSQL database. +# nginx configuration file +curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/nginx.conf -To restore the backup, you can use the following command. +# platform environment variable file +curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/platform.env +# temporal environment variable file +curl -O https://aiseepublicstorage.blob.core.windows.net/multiwoven-docker-compose/temporal.env +``` +4. Follow steps 5-8 to edit the platform.env and temporal.env environment variable files +5. For the following variables, replace `0.0.0.0` with either **localhost** or the **ip address** of your virtual machine +- ALLOWED_HOST="0.0.0.0" +- API_HOST="https://0.0.0.0" +- UI_HOST="https://0.0.0.0" +- VITE_API_HOST="https://0.0.0.0" + +6. For the SECRET_KEY_BASE, use a random string of 32 characters. +- SECRET_KEY_BASE="01010101010101010101010101010101" + +7. The following variables will allow the application to send you a single verification email during the account creation process. If you are using Gmail as recommended, you only need to change the following variables. For SMTP_SENDER and SMTP_USERNAME, you should use your gmail username/email address. For SMTP_PASSWORD, you should use an [app password](https://support.google.com/accounts/answer/185833?hl=en) associated with this gmail account. Note, your gmail account's default password will not work. You *must* create an app password. +- SMTP_PASSWORD="000 111 222 333" +- SMTP_SENDER_EMAIL=mw_test@gmail.com +- SMTP_USERNAME=mw_test@gmail.com + +8. If you are not using Gmail, you will also need to update the following variables with the appropriate values for the email service that you are using. +- SMTP_ADDRESS=smtp.gmail.com +- SMTP_HOST=gmail.com +- SMTP_PORT=587 + +9. (Optional) The following changes are only required if you are using an external/cloud postgresql database. +- DB_HOST=db +- DB_PASSWORD=password +- DB_PORT="5432" +- DB_USERNAME=multiwoven + +10. (Optional) If you are using an external database, please comment out the following lines in the docker-compose.yaml file. +- 59-65 +- 81 +- 103 + +11. Once your envrionment variables have been updated, please run the following command to deploy the application: ```bash -cat dump.sql | docker exec -i --user postgres psql -U postgres +docker-compose up -d ``` - -- If you are using a custom domain, make sure to update the `API_HOST` and `UI_HOST` environment variables in the `.env` file. - - - - - - +12. You should now be able to access your deployment using either `https://localhost` or `https://VM_IP_ADDRESS`. The nginx proxy will terminate TLS and route your requests back to the +necessary services. You can also access the **Temporal UI** directly via `localhost:8080` or `VM_IP_ADDRESS:8080`. From 287d9ac9b41698b07f6a519afd20a078fe771e92 Mon Sep 17 00:00:00 2001 From: AngeloAISquared Date: Mon, 7 Oct 2024 13:57:37 -0400 Subject: [PATCH 2/2] fix: remove docker-compose backup doc --- .../guides/setup/docker-compose-old.mdx | 143 ------------------ 1 file changed, 143 deletions(-) delete mode 100644 open-source/guides/setup/docker-compose-old.mdx diff --git a/open-source/guides/setup/docker-compose-old.mdx b/open-source/guides/setup/docker-compose-old.mdx deleted file mode 100644 index aa9d9b2..0000000 --- a/open-source/guides/setup/docker-compose-old.mdx +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: 'Docker' -description: 'Deploying Multiwoven using Docker' ---- - -Below steps will guide you through deploying Multiwoven on a server using Docker Compose. We require PostgreSQL database to store meta data for Multiwoven. We will use Docker Compose to deploy Multiwoven and PostgreSQL. - -Note: If you are setting up Multiwoven on your local machine, you can skip this section and refer to [Local Setup](/guides/setup/docker-compose-dev) section. - -## Prerequisites - -- [Docker](https://docs.docker.com/get-docker/) -- [Docker Compose](https://docs.docker.com/compose/install/) - - All our Docker images are available in x86_64 architecture, make sure your server supports x86_64 architecture. - -## Deployment options - -Multiwoven can be deployed using two different options for PostgreSQL database. - - - - - 1. Create a new directory for Multiwoven and navigate to it. - - ```bash - mkdir multiwoven - cd multiwoven - ``` - 2. Download the production `docker-compose.yml` file from the following link. - - ```bash - curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose.yaml - ``` - - 3. Download the `.env.production` file from the following link. - - ```bash - curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/.env.production - ``` - - 4. Rename the file .env.production to .env and update the environment variables if required. - - ```bash - mv .env.production .env - ``` - - 5. Start the Multiwoven using the following command. - - ```bash - docker-compose up -d - ``` - - 6. Stopping Multiwoven - - To stop the Multiwoven, use the following command. - - ```bash - docker-compose down - ``` - - 7. Upgrading Multiwoven - - When a new version of Multiwoven is released, you can upgrade the Multiwoven using the following command. - - ```bash - docker-compose pull && docker-compose up -d - ``` - Make sure to run the above command from the same directory where the `docker-compose.yml` file is present. - - - - - 1. Create a new directory for Multiwoven and navigate to it. - - ```bash - mkdir multiwoven - cd multiwoven - ``` - 2. Download the production `docker-compose.yml` file from the following link. - - ```bash - curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose-cloud-postgres.yaml - ``` - 3. Rename the file .env.production to .env and update the **PostgreSQL** environment variables. - - ```DB_HOST``` - Database Host - - ```DB_USERNAME``` - Database Username - - ```DB_PASSWORD``` - Database Password - - The default port for PostgreSQL is 5432. If you are using a different port, update the ```DB_PORT``` environment variable. - - ```bash - mv .env.production .env - ``` - - 4. Start the Multiwoven using the following command. - - ```bash - docker-compose up -d - ``` - - - -## Accessing Multiwoven - -Once the Multiwoven is up and running, you can access it using the following URL and port. - -Multiwoven Server URL: - -```http -http://:3000 -``` - -Multiwoven UI Service: - -```http -http://:8000 -``` - -If you are using a custom domain you can update the `API_HOST` and `UI_HOST` environment variable in the `.env` file. - -### Important considerations - -- Make sure to update the environment variables in the `.env` file before starting the Multiwoven. - -- Make sure to take regular **backups** of the PostgreSQL database. - -To restore the backup, you can use the following command. - -```bash -cat dump.sql | docker exec -i --user postgres psql -U postgres -``` - -- If you are using a custom domain, make sure to update the `API_HOST` and `UI_HOST` environment variables in the `.env` file. - - - - - -