Skip to content

Commit

Permalink
docs: Improve docker compose notes
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Lo <[email protected]>
  • Loading branch information
topher-lo authored Dec 26, 2024
1 parent ba2bc76 commit 8f3a127
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions docs/self-hosting/deployment-options/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ title: Docker Compose
description: Deploy Tracecat using a Docker Compose template.
---

<Note>
This deployment has been tested on macOS with Docker Desktop and Ubuntu Linux only.
For help with other operating systems, please find us on [Discord](https://discord.gg/n3GF4qxFU8) for support.
</Note>

## Prerequisites

- [Docker](https://docs.docker.com/engine/install/)
- [Docker Compose](https://docs.docker.com/compose/install/)
- [Docker](https://docs.docker.com/engine/install/) version 26.0.0+
- [Docker Compose](https://docs.docker.com/compose/install/) version 2.29.0+
- [openssl](https://www.openssl.org/source/)

## Verify Prerequisites

Expand All @@ -24,12 +30,10 @@ docker compose

<Note>
If you're deploying Tracecat into an external instance (e.g. AWS EC2, GCP Compute Engine, Azure VM),
please note that you'll have to set `PUBLIC_APP_URL` and `PUBLIC_API_URL` in the `.env` file
to the IP address or host you are accessing Tracecat from.
please note that you'll have to set `PUBLIC_APP_URL` and `PUBLIC_API_URL` in the `.env` file to the IP address or host you are accessing Tracecat from.

For example, if you are port forwarding Tracecat from `http://localhost` (port 80) inside AWS EC2
to `http://localhost:8080` on your local machine, you must set `PUBLIC_APP_URL` to `http://localhost:8080`
and `PUBLIC_API_URL` to `http://localhost:8080/api/`.
For example, if you are port forwarding Tracecat from `http://localhost` (port 80) inside AWS EC2 to `http://localhost:8080` on your local machine,
you must set `PUBLIC_APP_URL` to `http://localhost:8080` and `PUBLIC_API_URL` to `http://localhost:8080/api/`.

You can set these options when running the `env.sh` configuration script.
</Note>
Expand All @@ -40,8 +44,13 @@ Use the commands listed below to download the required configuration files
(`env.sh`, `.env.example`) and generate your own `.env` file.

```bash
# 1. Download the env.sh installation script
curl -o env.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/0.18.3/env.sh

# 2. Download the .env.example template file (env.sh needs this to generate your .env file)
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/0.18.3/.env.example

# 3. Make the env.sh script executable and run it
chmod +x env.sh && ./env.sh
```

Expand All @@ -59,6 +68,14 @@ You'll be prompted to input the following:
- `n` (no to postgres SSL mode).
</Info>

<Accordion title="Production Mode">

Note: setting production mode to `n` changes where Tracecat's remote repository is installed.
By default, Tracecat will install the remote repository to the user's home directory at `~/.local/lib/python3.12/site-packages/`.
Setting production mode to `y` will install the remote repository to the PYTHONUSERBASE directory specified in the `.env` file.

</Accordion>

![env.sh](/img/self-hosting/env-script.png)

## Download Caddyfile
Expand Down

0 comments on commit 8f3a127

Please sign in to comment.