How components should reach each other?

How components inside Digital Ocean Apps platform should reach each other via network? For example, I have 2 components, one is worker, another one is plain nginx with proxy_pass configuration to worker. I am referring to service names while using docker compose. What should I use here?

Docker compose file:

version: "3"
    build: .
    build: frontend
      - "8080:80"
      - tileserver

Inside frontend there is nginx.conf file with the following:

            proxy_pass http://tileserver;


Here is how it looks for my digital ocean apps platform spec:

name: maps
region: ams
- dockerfile_path: frontend/Dockerfile
  source_dir: frontend/
    branch: m/mbtiles
    deploy_on_push: true
    repo: digitaz/maps
  http_port: 80
  instance_count: 1
  instance_size_slug: basic-xxs
  name: frontend
  - path: /
- dockerfile_path: Dockerfile
    branch: m/mbtiles
    deploy_on_push: true
    repo: digitaz/maps
  instance_count: 1
  instance_size_slug: basic-xxs
  name: tileserver

How containers tileserver and frontend should reach each other? Specifically, how frontend should reach tileserver?

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.

Hello, you can create “internal services” by using internal_ports property in the app spec and without having an http_port property.

name: sample-golang
- name: intsvc1
    repo: digitalocean/sample-golang
    branch: master
  - 3000

The internal service should be addressable with just the component name, example http://intsvc1:3000. Here’s a quick and simple example repo with code and app spec that demonstrates the concepts.

So in you setup, the tileserver component should be a service that exposes port using internal_ports property, and the nginx config can proxy pass to that address as appropriate.

Hopefully this helps!