diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000000..0be8830f57 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,36 @@ +FROM gitpod/workspace-base:latest + + +# Install MongoDB +# Source: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/#install-mongodb-community-edition +USER gitpod +RUN mkdir -p /tmp/mongodb && \ + cd /tmp/mongodb && \ + wget -qOmongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.17.tgz && \ + tar xf mongodb.tgz && \ + cd mongodb-* && \ + sudo cp bin/* /usr/local/bin/ && \ + rm -rf /tmp/mongodb + +# Install node +USER gitpod +ENV NODE_VERSION=12.22.7 +ENV TRIGGER_REBUILD=1 +RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | PROFILE=/dev/null bash \ + && bash -c ". .nvm/nvm.sh \ + && nvm install $NODE_VERSION \ + && nvm alias default $NODE_VERSION \ + && npm install -g typescript yarn node-gyp" +ENV PATH=$PATH:/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin + +# Install Redis +USER gitpod +RUN wget https://download.redis.io/releases/redis-6.2.6.tar.gz && \ + tar xzf redis-6.2.6.tar.gz && \ + cd redis-6.2.6 && \ + make && \ + cd .. && \ + rm -f redis-6.2.6.tar.gz +ENV PATH=$PATH:/home/gitpod/redis-6.2.6/src + +USER gitpod \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000000..d1d57e000e --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,31 @@ +image: + file: .gitpod.Dockerfile + +# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/ +ports: + - port: 5000 + onOpen: open-preview + visibility: public +# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/ +tasks: + - init: | + mkdir -p /workspace/mongodb/data/db + command: | + mongod --replSet rs0 --dbpath /workspace/mongodb/data/db + - command: | + gp await-port 27017 + mongo steedos --eval "rs.initiate()" + - command: | + redis-server --save "" + - init: | + yarn install + yarn bootstrap + command: | + gp await-port 27017 + gp await-port 6379 + export ROOT_URL=$(gp url 5000) + yarn start + +vscode: + extensions: + - dbaeumer.vscode-eslint