Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor mongo-seed to only use Dockerfile & remove it from docker-compose #21

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ server_logs:
docker logs -f ping-server

prepare_db:
docker-compose up -d --build --remove-orphans mongo-seed
docker build -t mongo-seed ./mongo-seed
docker run --network mynet --rm -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=rootpassword mongo-seed

clean:
docker compose down
docker-compose down
13 changes: 1 addition & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.8'
version: "3.8"

services:
ping-server:
Expand Down Expand Up @@ -47,17 +47,6 @@ services:
ME_CONFIG_MONGODB_ADMINPASSWORD: rootpassword
ME_CONFIG_MONGO_DB_SERVER: mongodb_container
ME_CONFIG_MONGODB_URL: "mongodb://root:rootpassword@mongodb_container:27017/"
mongo-seed:
build: ./mongo-seed
networks:
- mynet
depends_on:
- mongodb_container
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: rootpassword
volumes:
- mongodb_data_container:/data/db
networks:
mynet:
driver: bridge
Expand Down