Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulNaturalist committed Mar 10, 2024
2 parents c773e2c + dfade3a commit 03e9d23
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
14 changes: 13 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
environment:
- MONGO_URI=${DATABASE_URL}
command: node app.js
networks:
- mynetwork

frontend:
build:
Expand All @@ -18,6 +20,8 @@ services:
container_name: front
ports:
- "3000:3000"
networks:
- mynetwork

mongo:
image: mongo:latest
Expand All @@ -28,6 +32,8 @@ services:
- ./data/db:/data/db
environment:
- MONGO_URI=${DATABASE_URL}
networks:
- mynetwork

nginx:
image: nginx:latest
Expand All @@ -37,4 +43,10 @@ services:
- "443:443"
volumes:
- ./nginx/backend.conf:/etc/nginx/conf.d/backend.conf
- ./nginx/front.conf:/etc/nginx/conf.d/front.conf
- ./nginx/front.conf:/etc/nginx/conf.d/front.conf
- ./front/build:/var/www/courseio.ru
networks:
- mynetwork

networks:
mynetwork:
10 changes: 7 additions & 3 deletions nginx/backend.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
upstream backend {
server backend:3030;
}

server {
listen 80;
server_name api.book-list.ru;
server_name api.courseio.ru;

location / {
proxy_pass http://localhost:3000;
proxy_pass http://backend;
}
}
}

0 comments on commit 03e9d23

Please sign in to comment.