Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Improvement] : Dockerize the Uploading_Files API #115 #116

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/APIs/Uploading_Files_API/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/.DS_Store
**/.env
**/.git
**/.idea
**/.vscode
**/dist
**/node_modules
**/test
17 changes: 17 additions & 0 deletions packages/APIs/Uploading_Files_API/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:alpine

WORKDIR /app

COPY . .

# Install npm dependencies
RUN npm install

# Set environment variables
ENV PORT=3000

ENV RUNTIME="localhost:3000"

EXPOSE 3000

CMD ["npm", "run", "dev"]
2 changes: 1 addition & 1 deletion packages/APIs/Uploading_Files_API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Express
- Multer

This requires minimal setup and configuration.Note that the tinyURL part requires your application to be deployed whose url shall be RUNTIME env variable,however for localhost development you can the use the RUNTIME as localhost:3000 or any suitable port but you would need to follow the instructions present in the Upload method of the UploadController class.
This requires minimal setup and configuration.Note that the tinyURL part requires your application to be deployed whose url shall be RUNTIME env variable,however for localhost development you can the use the RUNTIME as localhost:3000 or any suitable port but you would need to follow the instructions present in the Upload method of the UploadController class.You can also use docker to run this application by first building the image through the docker build . -t "your_image_name" and then docker run -p 3000:3000 -t "your_image_name".

Also you can import the postman collection present in the tests folder and test the endpoints.

Expand Down
Loading