From 6a1a6f6e687e8855137b2b33879397d2486e23f5 Mon Sep 17 00:00:00 2001 From: Filip Rojek Date: Tue, 2 Apr 2024 21:13:00 +0200 Subject: [PATCH] Added example compose files for databases --- src/skeletons/composes/mariadb.yaml | 12 ++++++++++++ src/skeletons/composes/mongodb.yaml | 20 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/skeletons/composes/mariadb.yaml create mode 100644 src/skeletons/composes/mongodb.yaml diff --git a/src/skeletons/composes/mariadb.yaml b/src/skeletons/composes/mariadb.yaml new file mode 100644 index 0000000..fdc0116 --- /dev/null +++ b/src/skeletons/composes/mariadb.yaml @@ -0,0 +1,12 @@ +version: '3.1' + +services: + db: + image: mariadb + restart: always + environment: + MARIADB_ROOT_PASSWORD: root + MARIADB_USER: nork + MARIADB_PASSWORD: nork + volumes: + ./db-data:/var/lib/mysql diff --git a/src/skeletons/composes/mongodb.yaml b/src/skeletons/composes/mongodb.yaml new file mode 100644 index 0000000..d45ed7b --- /dev/null +++ b/src/skeletons/composes/mongodb.yaml @@ -0,0 +1,20 @@ +# Use root/example as user/password credentials +version: '3.1' + +services: + mongo: + image: mongo + restart: always + environment: + MONGO_INITDB_ROOT_USERNAME: root + MONGO_INITDB_ROOT_PASSWORD: root + + mongo-express: + image: mongo-express + restart: always + ports: + - 8081:8081 + environment: + ME_CONFIG_MONGODB_ADMINUSERNAME: root + ME_CONFIG_MONGODB_ADMINPASSWORD: root + ME_CONFIG_MONGODB_URL: mongodb://root:example@mongo:27017/