DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

4 2

How to deploy STATEFUL container on DigitalOcean

The examples of usage includes,

  • When you want to use MongoDB Atlas beyond free tier limits; or other self-hosted database
  • Self-hosted WordPress
  • Self-hosted stateful docker container, such as Remark42 or Isso.

(I have done all three.)

Actually, it's the answer to this question.

The steps required are

    ports:
      - "80:8080"
      - "443:8443"

    environment:
      - SSL_TYPE=auto
      - SSL_ACME_EMAIL=<YOUR_EMAIL>
      - IMAGE_PROXY_HTTP2HTTPS=true
Enter fullscreen mode Exit fullscreen mode

Don't know if this is just my experience. docker-compose build on DigitalOcean droplet failed due to not enough memory. I have to build on my development machine (macOS), then push to Docker Hub. (Yes, this is my first time pushing to Docker Hub.) For anyone curious, see this gist.

For the time-being, feel free to visit the result of my success. -- https://polv.cc

Heroku

Deploy with ease. Manage efficiently. Scale faster.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

ITRS image

See What Users Experience in The Browser — Anywhere, Anytime

Simulate logins, checkouts, and payments on SaaS, APIs, and internal apps. Catch issues early, baseline web performance, and stay ahead of incidents. Easily record user journeys right from your browser.

Start Free Trial