generated from moevm/nsql-clean-tempate
-
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.
- Loading branch information
ifdjhxh
committed
Dec 12, 2024
1 parent
9a11265
commit a141df2
Showing
3 changed files
with
42 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,4 @@ | ||
FROM mongodb/mongodb-community-server:6.0-ubi8 | ||
WORKDIR / | ||
COPY . . | ||
CMD ["mongod", "--port", "27017"] |
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,27 @@ | ||
version: "3.8" | ||
|
||
services: | ||
app: | ||
container_name: app | ||
build: | ||
context: ./main | ||
dockerfile: Dockerfile | ||
depends_on: | ||
- db | ||
ports: | ||
- "127.0.0.1:4444:4444" | ||
|
||
db: | ||
container_name: db | ||
build: | ||
context: ./db | ||
dockerfile: Dockerfile | ||
restart: unless-stopped | ||
env_file: | ||
- .env | ||
volumes: | ||
- mongo-data:/data/db | ||
|
||
|
||
volumes: | ||
mongo-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,11 @@ | ||
FROM node:22.12.0 | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 4444 | ||
|
||
CMD ["node", "index.js"] |