Question

Is it possible to deploy two websites from single github private repo ?

I’d like to deploy two websites from single github private repo. One website is the admin panel and another website is the main application. Both are subfolders inside the repo

private-repo/
|__ admin/
|__ main/

how many .yml files would I need and where?


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
September 1, 2023

Hi there,

You are referring to the DigitalOcean App Platform correct?

If so, then the answer is yes, it’s possible to deploy multiple websites from a single GitHub private repo on DigitalOcean’s App Platform. Each application (or service) in the DigitalOcean App Platform is defined in the do-app.yaml manifest file.

You would need a single do-app.yaml file as you can define multiple services within a single manifest file. Each service represents one of your websites.

You will have to specify the source_dir for each of the projects to correspond to the correct location.

Here is a quick example:

name: my-project
services:
- name: admin-panel
  environment_slug: php # or whatever environment you're using
  github:
    repo: username/private-repo
    branch: main
    deploy_on_push: true
  source_dir: admin
  http_routes:
    - path: /
      health_check:
        path: /health
        interval_sec: 10
  # ... any other necessary configurations for the admin panel

- name: main-application
  environment_slug: php # or whatever environment you're using
  github:
    repo: username/private-repo
    branch: main
    deploy_on_push: true
  source_dir: main
  http_routes:
    - path: /
      health_check:
        path: /health
        interval_sec: 10
  # ... any other necessary configurations for the main application

You can also find the documentation for all of the available app specs here:

https://docs.digitalocean.com/products/app-platform/reference/app-spec/

That way both of the sites will be deployed in separate components but under one app.

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

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