From 6b1548059e9878a1b572b4892e60367b861712c8 Mon Sep 17 00:00:00 2001 From: Fahad Date: Mon, 18 Nov 2024 11:47:21 -0500 Subject: [PATCH] adding docker compose --- docker-compose.yaml | 25 +++++++++++++++++++++++++ ngnix.conf | 10 ++++++++++ 2 files changed, 35 insertions(+) create mode 100644 docker-compose.yaml create mode 100644 ngnix.conf diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..9daa01a --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,25 @@ +services: + backend: + build: + dockerfile: Dockerfile + container_name: server + ports: + - "3000:3000" + networks: + - app-network + + nginx: + image: nginx:latest + container_name: nginx + depends_on: + - backend + ports: + - "80:80" + networks: + - app-network + volumes: + - ./nginx.conf:/etc/nginx/conf.d/default.conf + +networks: + app-network: + driver: bridge \ No newline at end of file diff --git a/ngnix.conf b/ngnix.conf new file mode 100644 index 0000000..8b14306 --- /dev/null +++ b/ngnix.conf @@ -0,0 +1,10 @@ +server { + listen 80; + server_name test.byteccny.com; + + location / { + proxy_pass http://server:3000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } +} \ No newline at end of file