allow for custom ports

This commit is contained in:
2025-08-10 13:30:51 +01:00
parent 4105262f22
commit b790b3bd76
4 changed files with 234 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ services:
container_name: scoffer-mongodb
restart: unless-stopped
ports:
- "27017:27017"
- "${MONGODB_PORT:-27017}:27017"
volumes:
- mongodb_data:/data/db
- ./backend/seedData.js:/docker-entrypoint-initdb.d/01-seedData.js:ro
@@ -34,7 +34,7 @@ services:
- MONGODB_DATABASE=scoffer
- JWT_SECRET=${JWT_SECRET}
ports:
- "5000:5000"
- "${BACKEND_PORT:-5000}:5000"
depends_on:
mongodb:
condition: service_healthy
@@ -56,7 +56,7 @@ services:
environment:
- REACT_APP_API_URL=${REACT_APP_API_URL:-http://backend:5000/api}
ports:
- "3000:80"
- "${FRONTEND_PORT:-3000}:80"
depends_on:
- backend
networks:
@@ -68,7 +68,7 @@ services:
container_name: scoffer-mongo-express
restart: unless-stopped
ports:
- "8081:8081"
- "${MONGO_EXPRESS_PORT:-8081}:8081"
environment:
ME_CONFIG_MONGODB_URL: mongodb://mongodb:27017/
ME_CONFIG_BASICAUTH: false