Question

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

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?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
October 19, 2023

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel