Skip to the page
Social CrawlDocs

Deploy with Dokploy

Updated
View as Markdown

Run Social Crawl on a server managed with Dokploy instead of plain Docker: create a Compose service, set the environment, add two domains, deploy and check.

On this page

Dokploy (opens in a new tab) builds Social Crawl from its code, runs it, gives it web addresses with HTTPS, and updates it when the code changes. You do not need it: Install the server runs Social Crawl with plain Docker. Follow this page only if your server already runs Dokploy and you want to deploy that way.

This is the way the project's own server is deployed: main is always deployable, and Dokploy deploys every push to it.

What you need before you start#

The server and its addresses#

  • A server with Docker where Dokploy is installed. Install Dokploy first by following its own instructions at docs.dokploy.com (opens in a new tab).
  • Two web addresses that point at that server, for example app.example.com (the web app) and api.example.com (the extension talks to this one directly).

Your code and secrets#

  • The Social Crawl code in a Git repository that Dokploy can reach (your copy of the repository), for example on GitHub.
  • Your three secrets: POSTGRES_PASSWORD, JWT_SECRET and ADMIN_PASSWORD_HASH. Step 2 and step 3 of Install the server make them.

Step 1: Create the Compose service in Dokploy#

  1. In Dokploy, create a project, then add a Compose service.
  2. Set the provider to GitHub (or the Git provider you use), pick your Social Crawl repository and the main branch.
  3. Set the compose path to ./docker-compose.yml.

Step 2: Set the environment#

Open the service's Environment tab and paste these three lines, with your own values:

Text
POSTGRES_PASSWORD=the-48-letter-value
JWT_SECRET=the-64-character-value
ADMIN_PASSWORD_HASH=scrypt:...the whole 120-character line

The stack refuses to start without JWT_SECRET and ADMIN_PASSWORD_HASH. Every other setting has a default, and Environment variables lists them all. Do not add the COMPOSE_FILE line from the plain Docker steps.

Step 3: Add the two domains#

The two domains#

On the Domains tab add:

ServicePortExample address
web3000app.example.com
api4000api.example.com

Turn on HTTPS for both.

Auto Deploy#

Turn on Auto Deploy, so every change to the branch is built and started by itself.

Step 4: Deploy#

Press Deploy. Dokploy builds two images (the first build takes several minutes) and starts three containers: db (the database), api and web.

What you should see: the service's status turns to running, and the three containers are listed as healthy or running.

Step 5: Check that it works#

Open https://api.example.com/health in a browser. You should see:

JSON
{"status":"ok"}

Then open https://app.example.com. You should see the sign-in page: the name Social Crawl, the line "Your saved posts, offline and in one place.", and a single Password box.

Go on to Sign in for the first time.

Updates and logs#

Updates#

With Auto Deploy on, Dokploy rebuilds and restarts the stack whenever the branch changes. It does so whether or not the checks passed, so protect the branch.

Logs#

Read a container's log in the service's Logs tab. Deploy and operate says more, and how to deploy these docs as their own Dokploy service.

Changing a setting later#

Settings such as DATABASE_URL, the R2 values or API_TARGET go in the Environment tab, then Deploy again. The pages that name a setting say "your .env file (on Dokploy, the Environment tab)".