-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(db): add MongoDB and Mongo-Express to Docker setup
New configurations have been added to the Docker setup include MongoDB and Mongo-Express. The environment variables and service settings for these new components have been defined in the .env.dist and docker-compose.yml files respectively.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,35 @@ | ||
name: vale | ||
|
||
volumes: | ||
mongodb: | ||
|
||
services: | ||
main: | ||
build: . | ||
env_file: .env | ||
restart: always | ||
environment: | ||
- MONGO_HOST="mongo" | ||
|
||
mongo: | ||
image: mongo:latest | ||
restart: always | ||
environment: | ||
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USERNAME} | ||
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASSWORD} | ||
ports: | ||
- "${MONGO_PORT}:27017" | ||
volumes: | ||
- mongodb:/data/db | ||
|
||
mongo-express: | ||
image: mongo-express | ||
restart: always | ||
ports: | ||
- "${MONGO_ADMIN_PORT}:8081" | ||
environment: | ||
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_USERNAME} | ||
- ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_PASSWORD} | ||
- ME_CONFIG_MONGODB_URL=mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@mongo:${MONGO_PORT}/ | ||
- ME_CONFIG_MONGODB_AUTH_USERNAME=${MONGO_ADMIN_USERNAME} | ||
- ME_CONFIG_MONGODB_AUTH_PASSWORD=${MONGO_ADMIN_PASSWORD} |