From f1e288c71751d7044f60875edff5ff9bd2dc8b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Sieroci=C5=84ski?= Date: Fri, 30 Aug 2019 08:56:36 +0200 Subject: [PATCH] First commit --- .editorconfig | 21 +++++++++++++++++++++ .gitignore | 2 ++ Dockerfile | 25 +++++++++++++++++++++++++ LICENSE | 15 +++++++++++++++ README.md | 23 +++++++++++++++++++++++ entrypoint.sh | 3 +++ mongod.conf | 43 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 132 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100755 entrypoint.sh create mode 100644 mongod.conf diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bb1da45 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# +# EditorConfig +# +# This file helps maintain consistent coding styles for multiple developers +# working on the same project across various editors and IDEs +# +# https://EditorConfig.org +# + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce3e8d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/* +.vscode/* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5f40097 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# bitbar/ubunomo + +FROM bitbar/ubuno:1.0.0 + +LABEL vendor="Bitbar Inc" \ + description="Ubuntu LTS based Docker image with Node.js and MongoDB inside." + +# installing apt packages +RUN apt-get update +RUN apt-get dist-upgrade -y + +# installing MongoDB +RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add - +RUN echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list +RUN apt-get update +RUN apt-get install -y mongodb-org + +# Copy mongod.conf +COPY mongod.conf /etc/mongod.conf + +# entrypoint +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod +x /usr/local/bin/entrypoint.sh + +ENTRYPOINT ["entrypoint.sh"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0234764 --- /dev/null +++ b/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2019, Bitbar Inc + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d49b2d0 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# ubunomo + +(Ub)untu based Docker image with (No)de.js and (Mo)ngoDB inside. + +## Info + +* Based on [bitbar/ubuno](https://github.com/bitbar/ubuno) which has: + + * Ubuntu LTS (18.04) + * Node.js LTS (10) + * [learn more](https://github.com/bitbar/ubuno) + +* MongoDB 4.2 + +## Changelog + +* **1.0.0** + + * First public version + +## License + +[ISC License](LICENSE) diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..7a7aca5 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash +mongod --fork --config /etc/mongod.conf +exec "$@" diff --git a/mongod.conf b/mongod.conf new file mode 100644 index 0000000..245a57f --- /dev/null +++ b/mongod.conf @@ -0,0 +1,43 @@ +# mongod.conf + +# for documentation of all options, see: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +# Where and how to store data. +storage: + dbPath: /data/db + journal: + enabled: true +# engine: +# mmapv1: +# wiredTiger: + +# where to write logging data. +systemLog: + destination: file + logAppend: true + path: /var/log/mongodb/mongod.log + +# network interfaces +net: + port: 27017 + bindIp: 127.0.0.1 + + +# how the process runs +processManagement: + timeZoneInfo: /usr/share/zoneinfo + +#security: + +#operationProfiling: + +#replication: + +#sharding: + +## Enterprise-Only Options: + +#auditLog: + +#snmp: