Skip to content

Commit

Permalink
Merge pull request #2 from fga-eps-mds/Dockerfile
Browse files Browse the repository at this point in the history
feat: create docker file update docker-compose.yml with aplication image
  • Loading branch information
Matheusafonsouza authored Jan 9, 2025
2 parents cbcf210 + 7baaa79 commit 4452218
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14,257 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/dist
/node_modules
/build
package-lock.json

# Logs
logs
Expand Down
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use a lightweight Node.js image as the base
FROM node:20-alpine

# Set the working directory in the container
WORKDIR /app

# Copy package.json and package-lock.json to install dependencies
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code
COPY . .

# Build the NestJS application
RUN npm run build

# Expose the port the app will listen on
EXPOSE 3000

# Define the command to start the app
CMD ["node", "dist/main.js"]
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '3'
services:
postgres:
image: postgres
container_name: livro-livre-db
ports:
- 5432:5432
environment:
Expand Down
Loading

0 comments on commit 4452218

Please sign in to comment.