Skip to content

Commit

Permalink
fix: image not built with docker compose. mongodb service created
Browse files Browse the repository at this point in the history
  • Loading branch information
Yug-Oswal committed Sep 4, 2023
1 parent f38c408 commit 179ad4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
CMD ["node", "src/index.js"]
Expand Down
18 changes: 14 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
image: lasertag-backend
ports:
- ${PORT}:${PORT}
- ${PORT}:${PORT}
depends_on:
- mongodb

mongodb:
image: mongo
ports:
- 27017:27017
volumes:
- mongo-data:/data/db

volumes:
mongo-data:

0 comments on commit 179ad4e

Please sign in to comment.