forked from krishnaacharyaa/wanderlust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat-krishnaacharyaa#131 Dockerize the application
- Loading branch information
1 parent
230c2fb
commit d4b19cb
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM node:21 | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm i | ||
COPY .env.sample .env | ||
EXPOSE 5000 | ||
CMD ["npm", "start"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: "3.8" | ||
services: | ||
mongodb: | ||
container_name: mongo | ||
image: mongo:latest | ||
volumes: | ||
- ./backend/data:/data | ||
ports: | ||
- "27017:27017" | ||
backend: | ||
container_name: backend | ||
build: ./backend | ||
env_file: | ||
- ./backend/.env.sample | ||
ports: | ||
- "5000:5000" | ||
depends_on: | ||
- mongodb | ||
frontend: | ||
container_name: frontend | ||
build: ./frontend | ||
env_file: | ||
- ./frontend/.env.sample | ||
ports: | ||
- "5173:5173" | ||
|
||
volumes: | ||
data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM node:21 | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm i | ||
COPY .env.sample .env.local | ||
EXPOSE 5173 | ||
CMD ["npm", "run", "dev", "--", "--host"] |