Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

296
Visualizações
Using Let's Encrypt certificates on DigitalOcean App Platform for a HTTPS node app

I'm used to deploying HTTPS Node apps on DigitalOcean servers using Docker, the Express framework and the https package like this:

const https = require('https');

const app = express();

// ...

const ssl = {
  key: fs.readFileSync(process.env.PRIVATE_KEY),
  cert: fs.readFileSync(process.env.CERT),
  ca: fs.readFileSync(process.env.CHAIN),
};

const server = https.createServer(ssl, app);
server.listen({ port }, () => {
  // ...
});

My app is inside a Docker container, but I expose the certicates that are on the droplet with the "v" option when I do docker run, like this:

-v /etc/letsencrypt/:/etc/letsencrypt

Finally, my Docker container is passed environment variables so that my Node app can know the paths to the various certificates files. For example,

CHAIN=/etc/letsencrypt/live/mydomain.com/chain.pem

And now, my Node app can read the certificates and create an HTTPS server with them.

I don't know if this setup is ideal, but it works well.


Now, I'm wondering how to do the same using the DigitalOcean App Platform.
So far, what I've done is this:

  • Changed DNS for my domain to point to DigitalOcean's nameservers
  • Created a DO-managed Let's Encrypt certificate for this domain, following this procedure: https://www.digitalocean.com/docs/accounts/security/certificates/
  • Created a DO App, defining my app as a service

But I can't get it to work with the certificates and therefore, have my HTTPS app work.
Does anyone here have an idea?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda