diff --git a/.gitpod.yml b/.gitpod.yml index 4815391cc8..9b429653a8 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -31,6 +31,7 @@ tasks: command: | echo "ROOT_URL=$(gp url 6000)" >> .env.local echo "METADATA_SERVER=$(gp url 6000)" >> .env.local + echo "ROOT_URL=$(gp url 80)" >> deploy/enterprise/.env yarn docker:db - name: Steedos init: | diff --git a/deploy/enterprise/Dockerfile b/deploy/enterprise/Dockerfile index 71ee237d33..cb56b1e945 100644 --- a/deploy/enterprise/Dockerfile +++ b/deploy/enterprise/Dockerfile @@ -13,19 +13,51 @@ RUN apt-get update || : && apt-get install -y \ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - -# Install MongoDB 5.0 -# https://www.mongodb.com/docs/v5.0/tutorial/install-mongodb-on-debian/ RUN apt-get update \ && apt-get install -y gnupg curl nodejs yarn -RUN curl -fsSL https://pgp.mongodb.com/server-5.0.asc | \ - gpg -o /usr/share/keyrings/mongodb-server-5.0.gpg \ - --dearmor --no-tty +# Install MongoDB 4.4.25 +# https://www.mongodb.com/docs/v4.4/tutorial/install-mongodb-on-ubuntu/ +# https://github.com/docker-library/mongo/blob/66197d92be6eafc0a36b2570172de0a5f7a905e1/4.4/Dockerfile +RUN set -ex; \ + export GNUPGHOME="$(mktemp -d)"; \ + set -- '20691EEC35216C63CAF66CE1656408E390CFB1F5'; \ + for key; do \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ + done; \ + mkdir -p /etc/apt/keyrings; \ + gpg --batch --export "$@" > /etc/apt/keyrings/mongodb.gpg; \ + gpgconf --kill all; \ + rm -rf "$GNUPGHOME" -RUN echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-5.0.gpg ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list +# Allow build-time overrides (eg. to build image with MongoDB Enterprise version) +# Options for MONGO_PACKAGE: mongodb-org OR mongodb-enterprise +# Options for MONGO_REPO: repo.mongodb.org OR repo.mongodb.com +# Example: docker build --build-arg MONGO_PACKAGE=mongodb-enterprise --build-arg MONGO_REPO=repo.mongodb.com . +ARG MONGO_PACKAGE=mongodb-org +ARG MONGO_REPO=repo.mongodb.org +ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO} -RUN apt-get update \ - && apt-get install -y mongodb-org=5.0.20 mongodb-org-database=5.0.20 mongodb-org-server=5.0.20 mongodb-org-shell=5.0.20 mongodb-org-mongos=5.0.20 mongodb-org-tools=5.0.20 +ENV MONGO_MAJOR 4.4 +RUN echo "deb [ signed-by=/etc/apt/keyrings/mongodb.gpg ] http://$MONGO_REPO/apt/ubuntu focal/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR multiverse" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list" + +# https://docs.mongodb.org/master/release-notes/4.4/ +ENV MONGO_VERSION 4.4.25 +# 09/26/2023, https://github.com/mongodb/mongo/tree/3e18c4c56048ddf22a6872edc111b542521ad1d5 + +RUN set -x \ +# installing "mongodb-enterprise" pulls in "tzdata" which prompts for input + && export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install -y \ + ${MONGO_PACKAGE}=$MONGO_VERSION \ + ${MONGO_PACKAGE}-server=$MONGO_VERSION \ + ${MONGO_PACKAGE}-shell=$MONGO_VERSION \ + ${MONGO_PACKAGE}-mongos=$MONGO_VERSION \ + ${MONGO_PACKAGE}-tools=$MONGO_VERSION \ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/mongodb \ + && mv /etc/mongod.conf /etc/mongod.conf.orig # Install nginx && redis RUN apt-get update \ diff --git a/deploy/enterprise/README.md b/deploy/enterprise/README.md index 67a0311754..bcaf6b338a 100644 --- a/deploy/enterprise/README.md +++ b/deploy/enterprise/README.md @@ -188,4 +188,8 @@ To learn more, please refer to [Supervisor's documentation](http://supervisord.o ## Troubleshooting -If you encounter any errors during this process, please reach out to [**support@steedos.com**](mailto:support@steedos.com) or join our [Discord Server](https://discord.gg/84BFNFQP) and reach out on the #support channel. \ No newline at end of file +If you encounter any errors during this process, please reach out to [**support@steedos.com**](mailto:support@steedos.com) or join our [Discord Server](https://discord.gg/84BFNFQP) and reach out on the #support channel. + +## Special Thanks + +- [Appsmith](https://github.com/appsmithorg/appsmith) \ No newline at end of file diff --git a/deploy/enterprise/docker-compose.yml b/deploy/enterprise/docker-compose.yml index 0ff8ced3eb..220ec4d0c8 100644 --- a/deploy/enterprise/docker-compose.yml +++ b/deploy/enterprise/docker-compose.yml @@ -10,6 +10,7 @@ services: ports: - "80:80" - "443:443" + - "3000:3000" environment: - ROOT_URL=http://127.0.0.1:3000 tty: true