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

Top comments (0)

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay