Node.js portfolio app that reads its content from MongoDB. Runs with Docker Compose.
66
A Node.js portfolio page that reads its content (profile, projects, skills, experience) from MongoDB. Source and full Compose setup: https://github.com/amirtheswe/docker-compose-mongo-demo
The image needs a MongoDB to talk to, which the Compose file in the GitHub repo provides:
git clone https://github.com/amirtheswe/docker-compose-mongo-demo
cd docker-compose-mongo-demo
printf "MONGO_USER=admin\nMONGO_PASSWORD=choose-a-password\n" > .env
docker compose up -d --build
Then open http://localhost:3000.
Put it on the same Docker network as a running MongoDB:
docker run -d -p 3000:3000 --network <network> \
-e MONGO_DB_USERNAME=<user> -e MONGO_DB_PWD=<password> \
-e MONGO_HOST=<mongo hostname> \
amirtheswe/docker-compose-mongo-demo:1.0
| Variable | Meaning | Default |
|---|---|---|
| MONGO_DB_USERNAME | MongoDB user | none |
| MONGO_DB_PWD | MongoDB password | none |
| MONGO_HOST | MongoDB hostname | mongodb |
| DB_NAME | Database name | portfolio |
Listens on port 3000, runs as the non-root node user, and has a healthcheck.
On first start it fills any empty collections with starting data.
Content type
Image
Digest
sha256:64be6feb4…
Size
56.2 MB
Last updated
8 days ago
docker pull amirtheswe/docker-compose-mongo-demo