Skip to content

Commit

Permalink
Merge pull request #5 from JIlyaS/module4-task1
Browse files Browse the repository at this point in the history
  • Loading branch information
keksobot authored Oct 13, 2024
2 parents 216a8e9 + 5baeab2 commit 3e87628
Show file tree
Hide file tree
Showing 34 changed files with 1,077 additions and 91 deletions.
15 changes: 15 additions & 0 deletions Workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ npm run mock:server
npm run ts ./src/main.cli.ts -- --generate 100 ./mocks/test-data.tsv http://localhost:3123/api
```

### --import

```bash
npm run ts ./src/main.cli.ts -- --import ./src/mocks/test-data.tsv admin test localhost six-sities secret
```

```bash
./cli.js --generate 10 ./mocks/mock-offers.tsv http://localhost:3123/api
```

## Запуск docker-compose файла для запуска служб баз данных

```bash
docker compose --file ./docker-compose.dev.yml --env-file ./.env --project-name "six-cities" up -d
```



28 changes: 28 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
services:
db:
image: mongo:4.2
restart: always
container_name: six-cities_mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: ${DB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${DB_PASSWORD}
ports:
- ${DB_PORT}:27017
volumes:
- six-cities_data:/data/db

db_ui:
image: mongo-express:latest
restart: always
container_name: six-cities_mongo_express
ports:
- 8082:8081
environment:
ME_CONFIG_BASICAUTH_USERNAME: ${DB_USER}
ME_CONFIG_BASICAUTH_PASSWORD: ${DB_PASSWORD}
ME_CONFIG_MONGODB_ADMINUSERNAME: ${DB_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${DB_PASSWORD}
ME_CONFIG_MONGODB_URL: mongodb://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/

volumes:
six-cities_data:
Loading

0 comments on commit 3e87628

Please sign in to comment.