-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #571 from haseebzaki-07/new_branch
Add docker compose file to the root of the project
- Loading branch information
Showing
4 changed files
with
64 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,7 @@ | ||
FROM node:alpine | ||
WORKDIR /app | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
COPY . . | ||
EXPOSE 5173 | ||
CMD ["npm", "run" , "dev"] |
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,10 @@ | ||
FROM node:alpine | ||
WORKDIR /app | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run backend-build | ||
|
||
|
||
EXPOSE 8000 | ||
CMD ["npm", "run" , "dev"] |
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,40 @@ | ||
|
||
services: | ||
|
||
admin: | ||
build: | ||
context: ./admin | ||
container_name: styleshare-admin | ||
ports: | ||
- '5173:5173' | ||
|
||
frontend: | ||
build: | ||
context: ./frontend | ||
container_name: styleshare-frontend | ||
ports: | ||
- '3000:3000' | ||
|
||
backend: | ||
build: | ||
context: ./backend | ||
container_name: styleshare-backend | ||
depends_on: | ||
- db | ||
environment: | ||
- DATABASE_URL=${DATABASE_URL} | ||
|
||
ports: | ||
- '8000:8000' | ||
|
||
db: | ||
image: mongo:latest | ||
container_name: styleshare-db | ||
restart: always | ||
ports: | ||
- '27017:27017' | ||
volumes: | ||
- mongodb_data:/data/db | ||
|
||
volumes: | ||
mongodb_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:alpine | ||
WORKDIR /app | ||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
COPY . . | ||
EXPOSE 3000 | ||
CMD ["npm", "run" , "dev"] |