I've been struggling for a bit on this and I'm starting to get depressed...
I'm running a droplet on DigitalOcean with Ubuntu 18.10.
I've used Docker to serve my different service (nuxt, socket.io, nginx, nodejs)
And I've used Nginx to revese proxy those services (at first i'd just want to render the nuxt app)
When executing
docker-compose up --build -d
All processes are running and are accessible on the server but inaccessible from my local machine (I get a 504 Gateway Timeout).
There is one time where I got it working but when adding some location rule, it broke again.
So here's my config for nginx :
server {
listen 8080;
server_name 104.248.201.255;
location / {
proxy_pass http://doodlehelha-nuxt:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
And here's the nginx service in my docker-compose.yml
nginx:
image: nginx:1.15
container_name: doodlehelha-nginx
ports:
- '8080:8080'
- '443:443'
expose:
- '8080'
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- nuxt
- api
- socket
This is a very simple configuration and that's why I don't know what's wrong... If someone more experienced can point it out, I'd be very grateful.