Skip to content

Commit

Permalink
chore: update docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
minenwerfer committed Feb 18, 2024
1 parent d123ce6 commit 89c28c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 0 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM node:20

ARG MONGODB_URL
ENV MONGODB_URL $MONGODB_URL

WORKDIR /opt/application/api
COPY . .

Expand Down
10 changes: 2 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,18 @@ services:
volumes:
- /tmp/mongodb-test:/data/db
- api-build:/opt/application/api-build
ports:
- 27017:27017
logging:
driver: none
network_mode: host

api:
build:
context: api
network: host
args:
MONGODB_URL: mongodb://0.0.0.0:27017/testdb
restart: always
depends_on:
- mongo
volumes:
- api-build:/opt/application/api-build
env_file: api/production.env
network_mode: host

web:
build:
Expand All @@ -42,9 +35,10 @@ services:
restart: always
depends_on:
- web
ports:
- 80:80
volumes:
- web-build:/var/www/html
network_mode: host

volumes:
api-build:
Expand Down
2 changes: 1 addition & 1 deletion nginx/sites-enabled/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ server {
}

location /api {
proxy_pass http://0.0.0.0:3000;
proxy_pass http://api:3000;
proxy_set_header Host $host;
proxy_cache off;
}
Expand Down

0 comments on commit 89c28c3

Please sign in to comment.