diff --git a/docker-compose.db.yml b/docker-compose.db.yml new file mode 100644 index 0000000..3f55e64 --- /dev/null +++ b/docker-compose.db.yml @@ -0,0 +1,22 @@ +--- +services: + mongo: + image: mongo:6.0.5 + restart: unless-stopped + volumes: + - mongo:/data/db + command: + - --storageEngine=wiredTiger + environment: + - "MONGO_INITDB_ROOT_USERNAME=mongo" + - "MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD}" + networks: + - internal + ports: + - 27017:27017 + +networks: + internal: + +volumes: + mongo: \ No newline at end of file diff --git a/package.json b/package.json index 2941f31..14f8acf 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "dev": "docker compose up", + "dev:db": "docker compose -f docker-compose.db.yaml up", "dev:next": "cross-env NODE_OPTIONS=--no-deprecation next dev", "devturbo": "cross-env NODE_OPTIONS=--no-deprecation next dev --turbo", "devsafe": "rm -rf .next && cross-env NODE_OPTIONS=--no-deprecation next dev",