diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile new file mode 100644 index 0000000..4d54daf --- /dev/null +++ b/.gitpod.dockerfile @@ -0,0 +1,34 @@ +FROM gitpod/workspace-base + +USER gitpod + +# Dazzle does not rebuild a layer until one of its lines are changed. Increase this counter to rebuild this layer. +ENV TRIGGER_REBUILD=1 + +# Install MongoDB +# Source: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/#install-mongodb-community-edition +RUN mkdir -p /tmp/mongodb && \ + cd /tmp/mongodb && \ + wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.8.tgz && \ + tar xf mongodb.tgz && \ + cd mongodb-* && \ + sudo cp bin/* /usr/local/bin/ && \ + rm -rf /tmp/mongodb && \ + sudo mkdir -p /data/db && \ + sudo chown gitpod:gitpod -R /data/db + +# Install tools +RUN sudo apt-get install gnupg && \ + wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - +RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | \ + sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list + +RUN sudo apt-get update && sudo apt-get install -y mongodb-mongosh + +RUN mkdir -p /tmp/mongodb-tools && \ + cd /tmp/mongodb-tools && \ + wget -qOtools.tgz https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.5.2.tgz && \ + tar xf tools.tgz && \ + cd mongodb-* && \ + sudo cp bin/* /usr/local/bin/ && \ + rm -rf /tmp/mongodb-tools \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..fac990c --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,5 @@ +image: + file: .gitpod.dockerfile + +tasks: + - command: mkdir -p /workspace/data && mongod --dbpath /workspace/data \ No newline at end of file