forked from krishnaacharyaa/wanderlust
-
Notifications
You must be signed in to change notification settings - Fork 278
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
b49724f
commit 7b80da7
Showing
3 changed files
with
58 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,15 @@ | ||
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,30 @@ | ||
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: | ||
- ./backend/.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,13 @@ | ||
FROM node:21 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN npm i | ||
|
||
COPY .env.sample .env.local | ||
|
||
EXPOSE 5173 | ||
|
||
CMD ["npm", "run", "dev","--","--host"] |