-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f29c02
commit 0023323
Showing
1 changed file
with
29 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,29 @@ | ||
# Start with the official MongoDB image | ||
FROM mongo:latest | ||
|
||
# Install Node.js | ||
RUN apt-get update && \ | ||
apt-get install -y curl gnupg && \ | ||
curl -sL https://deb.nodesource.com/setup_18.x | bash - && \ | ||
apt-get install -y nodejs | ||
|
||
# Clone the repository | ||
RUN git clone https://github.com/hppanpaliya/React-TrashMail | ||
|
||
# Build the React project | ||
WORKDIR /React-TrashMail/react | ||
RUN yarn && \ | ||
yarn run build | ||
|
||
# Install dependencies for the mailserver | ||
WORKDIR /React-TrashMail/mailserver | ||
RUN yarn | ||
|
||
# Install pm2 globally | ||
RUN npm install -g pm2 | ||
|
||
# Define mountable volume | ||
VOLUME ["/React-TrashMail/mailserver/attachments"] | ||
|
||
# Set the command to start MongoDB and the mail server | ||
CMD ["sh", "-c", "rc-service mongodb start && pm2-runtime start yarn -- start"] |