Pacharapol Withayasakpunt Pacharapol Withayasakpunt
Sun, May 24, 2020

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.

https://dev.to/patarapolw/need-help-deploy-docker-that-needs-storage-on-google-2l7n

The steps required are

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

    environment:
      - SSL_TYPE=auto
      - SSL_ACME_EMAIL=<YOUR_EMAIL>
      - IMAGE_PROXY_HTTP2HTTPS=true

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.

https://gist.github.com/patarapolw/4c72fa4612c6e1c45474b82bac157f4a