Report this

What is the reason for this report?

How do I upload a docker compose application that is in github

Posted on October 19, 2023

I have an application comprising nestjs, redis, and postgresl that is built using docker compomise on my local macbook. The application is in gitHub. I am trying to upload this to digital ocean and then run docker compose in a single droplet. Is there a guide about this?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

What you could do is:

  • Spin up a new Droplet with Docker installed, you could use the following 1-click installation here

https://marketplace.digitalocean.com/apps/docker

  • Next, clone your repository on that Droplet:
git clone YOUR-GITHUB-REPOSITORY-URL
  • Access the directory:
cd YOUR-GITHUB-REPOSITORY-URL
  • Finally run Docker Compose, and if your application has any environment variables or configurations that need to be updated for the production environment, make sure to update them first. Then, you can run:
docker-compose up -d

One additional thing that you should consider is using a firewall to close some of the specific ports like the Redis one for example:

https://docs.digitalocean.com/products/networking/firewalls/

Let me know if you have any questions!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.