Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

460
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!