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

459
Visualizações
Deploying Docker container with NGINX to a domain

Having pushed to DockerHub and successfully tagged a image, I can create remotly a docker container on a Digital Ocean droplet. That's good, but since I host more than one website on this IP, I use the NginX server. My goal is, having example.com nginx config, to set up and deploy the docker container into this website (example.com) with the Engine-X.

docker stack deploy -c ~/etc/example.com/docker-compose.yml example.com

I tried to specify the path, also creating the docker based on the NGINX image, but nothing actually worked for me.

My nginx example.com config:

server {

        root /etc/example.com/docker-compose.yml (???);
        index index.html index.htm index.nginx-debian.html; (??)

        server_name example.com www.example.com;

        location / {
                try_files $uri $uri/ =404;
        }

    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/bratac.net/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/bratac.net/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = www.example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = example.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;
        listen [::]:80;

        server_name example.com www.example.com;
    return 404; # managed by Certbot
}

Any thoughts would be appreciated, I really dont know what to do next, researched deep in the net..

Best Regards

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