Skip to content

Commit

Permalink
Updates Docker configuration and README; modifies exposed port and re…
Browse files Browse the repository at this point in the history
…moves unused middleware

Updates Docker configuration and README, modifies exposed port

Updates Dockerfile and compose.yaml to expose port 3001 instead of 3000
Removes unused middleware and prevents flooding middleware code workspace

Fixes #123
  • Loading branch information
karol-preiskorn committed Jan 23, 2025
1 parent 57405d0 commit 213ec4b
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 126 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ RUN PATH="/usr/src/3d-inventory-api/node_modules/.bin:$PATH" \
&& NODE_PATH="$NODE_PATH:$(npm root -g)" \
&& export NODE_PATH

EXPOSE 3001:3000
EXPOSE 3001:3001

CMD ["node", "src/index.js"]
# CMD ["node", "src/index.js"]
4 changes: 2 additions & 2 deletions README.Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ cp api.yaml .env dist/src && node dist/src/index.js

First, build your image, e.g.:

```docker
```bash
docker build -t 3d-inventory-api .
```

Then, push it to your registry, e.g.

```docker
```bash
docker image push docker.io/kpreiskorn/3d-inventory-mongo-api:latest
```

Expand Down
20 changes: 10 additions & 10 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ version: '3.8'
services:
app:
build: .
command: npm start
command: node src/index.js
ports:
- "3000:3000"
- "3001:3001"
env_file:
- .env

mongo:
image: mongo:4.4
ports:
- 27017:27017
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
# mongo:
# image: mongo:4.4
# ports:
# - 27017:27017
# restart: always
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: example

# mongo-express:
# image: mongo-express
Expand Down
171 changes: 79 additions & 92 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 213ec4b

Please sign in to comment.