Browse Source

Initial commit

master
Yutsuo 5 years ago
parent
commit
857179d5bd
  1. 4
      Dockerfile
  2. 26
      docker-compose.yml
  3. 62968
      seed.json

4
Dockerfile

@ -0,0 +1,4 @@
FROM mongo:latest
COPY seed.json /seed.json
CMD mongoimport --host mongodb --db pokemon --collection Pokemon --drop --type json --file /seed.json --jsonArray

26
docker-compose.yml

@ -0,0 +1,26 @@
version: "3.7"
services:
mongodb:
image: mongo:latest
container_name: mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
seed:
container_name: seed
build: .
links:
- mongodb
mongo-express:
image: mongo-express:latest
restart: on-failure
ports:
- "8081:8081"
links:
- mongodb
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example

62968
seed.json

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save