OpenStock is an open-source alternative to expensive market platforms. Track real-time prices, set personalized alerts, and explore detailed company...
docker pull library/mongo
docker run -d --name openstock -p 3000:3000 --restart always mongo:7
podman run -d --name openstock -p 3000:3000 --restart always mongo:7
skopeo inspect docker://docker.io/library/mongo:7
oras pull mongo:7
docker compose up -d
services:
openstock:
build:
context: .
args:
# Fixed into the app at build time; set it in .env, then rebuild
NEXT_PUBLIC_OPENSTOCK_DATA_MODE: ${NEXT_PUBLIC_OPENSTOCK_DATA_MODE:-cached}
ports:
- "3000:3000"
env_file:
- .env
restart: unless-stopped
depends_on:
mongodb:
condition: service_healthy
mongodb:
image: mongo:7
container_name: mongodb
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: root
# Set MONGO_ROOT_PASSWORD in .env and use the same password in MONGODB_URI. Only read on the first start.
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD:-example}
# No published port: only the app reaches MongoDB, over the Compose network. To use mongosh or Compass from
# your machine, add ports: ["127.0.0.1:27017:27017"] (a bare "27017:27017" exposes it on every interface).
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--quiet", "--eval", "db.adminCommand('ping')"]
interval: 10s
timeout: 5s
retries: 5
volumes:
mongo-data: