Docker swarm with Nginx as Reverse Proxy

Hi Team,

There are two web applications that were running fine on our server, but after i moved this into docker swarm along with nginx configuration there is an issue , the web page is not loading. im sure its because of nginx. but this web applications are running fine without docker with same nginx configuration. I need to move this docker swarm to production within one or two days, but im stuck .

docker stack file for admin

networks:
    dev_shared_admin: 
        external: true

services:
    admintc:
        image: salmanshariff171/devadmin:V1.0.0.2
        deploy:
            replicas: 2
            update_config:
                parallelism: 1
                delay: 10s
                failure_action: rollback
            restart_policy:
                condition: on-failure
                max_attempts: 3
                delay: 20s
                window: 120s
        networks:
            - dev_shared_admin
        ports:
            - target: 5173
              published: 5173
              protocol: tcp
              mode: ingress

    proxy_server:
        image: nginx
        ports:
            - 8080:80
        volumes:
            - /root/dockers_configuration/admin_nginx.conf:/etc/nginx/nginx.conf  # Main Nginx config
            - /root/dockers_configuration/admin_nginx-entrypoint.sh:/usr/local/bin/nginx-entrypoint.sh
        networks:
            - dev_shared_admin
        depends_on:
            - admintc
        entrypoint: ["/usr/local/bin/nginx-entrypoint.sh"]  # Use the custom entrypoint script

This are the complete containers for docker stack devadmin


[root@server admin_docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3886eb3a4181 nginx:latest “/usr/local/bin/ngin…” 8 minutes ago Up 8 minutes 80/tcp devadmin_proxy_server.1.mqn7as35kxz0fzqs6che1j92f
a175431fc8e0 salmanshariff171/devadmin:V1.0.0.2 “docker-entrypoint.s…” 54 minutes ago Up 54 minutes devadmin_admintc.1.ullzwwsc9uexz4zhc079w6860
413aef944ac5 salmanshariff171/devadmin:V1.0.0.2 “docker-entrypoint.s…” 54 minutes ago Up 54 minutes devadmin_admintc.2.mg139ltuwk5ygmsvgfcu9z4sf
[root@server admin_docker]# docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
zrhqob94dln8 devadmin_admintc replicated 2/2 salmanshariff171/devadmin:V1.0.0.2 *:5173->5173/tcp
bd1vyutgabm1 devadmin_proxy_server replicated 1/1 nginx:latest *:8080->80/tcp
[root@server admin_docker]# docker service ps bd1vyutgabm1
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
mqn7as35kxz0 devadmin_proxy_server.1 nginx:latest [server.localhost.com](http://server.localhost.com/) Running Running 8 minutes ago
w6qclo1xf6gw _ devadmin_proxy_server.1 nginx:latest [server.localhost.com](http://server.localhost.com/) Shutdown Shutdown 8 minutes ago
ttre7h9cofvv _ devadmin_proxy_server.1 nginx:latest [server.localhost.com](http://server.localhost.com/) Shutdown Shutdown 10 minutes ago
pxzddp7xqdw6 _ devadmin_proxy_server.1 nginx:latest [server.localhost.com](http://server.localhost.com/) Shutdown Shutdown 14 minutes ago
4oxs81zrw3fv _ devadmin_proxy_server.1 nginx:latest [server.localhost.com](http://server.localhost.com/) Shutdown Failed 56 minutes ago “task: non-zero exit (1)”
[root@server admin_docker]# docker service ps zrhqob94dln8
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
ullzwwsc9uex devadmin_admintc.1 salmanshariff171/devadmin:V1.0.0.2 [server.localhost.com](http://server.localhost.com/) Running Running 55 minutes ago
kvx48canf4sn _ devadmin_admintc.1 salmanshariff171/devadmin:V1.0.0.2 [server.localhost.com](http://server.localhost.com/) Shutdown Complete 3 hours ago
mg139ltuwk5y devadmin_admintc.2 salmanshariff171/devadmin:V1.0.0.2 [server.localhost.com](http://server.localhost.com/) Running Running 55 minutes ago
0atyqc3qjftb _ devadmin_admintc.2 salmanshariff171/devadmin:V1.0.0.2 [server.localhost.com](http://server.localhost.com/) Shutdown Complete 3 hours ago