2024-03-05 09:37:22 +00:00
|
|
|
FROM caddy:builder-alpine AS caddybuilder
|
|
|
|
|
|
|
|
|
|
RUN xcaddy build \
|
|
|
|
|
--with github.com/mholt/caddy-ratelimit
|
|
|
|
|
|
2023-10-18 08:47:38 +00:00
|
|
|
FROM ubuntu:20.04
|
|
|
|
|
|
|
|
|
|
LABEL maintainer="tech@appsmith.com"
|
|
|
|
|
|
|
|
|
|
WORKDIR /opt/appsmith
|
|
|
|
|
|
|
|
|
|
# The env variables are needed for Appsmith server to correctly handle non-roman scripts like Arabic.
|
2024-11-14 09:15:48 +00:00
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
ENV LC_ALL=C.UTF-8
|
2023-10-18 08:47:38 +00:00
|
|
|
|
2023-12-21 05:52:41 +00:00
|
|
|
# Install dependency packages
|
2024-01-22 03:45:56 +00:00
|
|
|
RUN set -o xtrace \
|
|
|
|
|
&& apt-get update \
|
2023-10-18 08:47:38 +00:00
|
|
|
&& apt-get upgrade --yes \
|
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \
|
2024-01-08 02:16:21 +00:00
|
|
|
supervisor curl nfs-common gnupg wget netcat openssh-client \
|
2023-10-18 08:47:38 +00:00
|
|
|
gettext \
|
2024-01-22 03:45:56 +00:00
|
|
|
ca-certificates \
|
2024-01-09 01:40:46 +00:00
|
|
|
# Install MongoDB v5, Redis, PostgreSQL v13
|
|
|
|
|
&& curl --silent --show-error --location https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - \
|
2023-10-18 08:47:38 +00:00
|
|
|
&& echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list \
|
|
|
|
|
&& echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
|
|
|
|
|
&& curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
|
|
|
|
&& apt update \
|
2024-07-05 12:24:58 +00:00
|
|
|
&& apt-get install --no-install-recommends --yes mongodb-org redis postgresql-14 \
|
2023-10-18 08:47:38 +00:00
|
|
|
&& apt-get clean
|
|
|
|
|
|
chore: Add script to upgrade Postgres 13 data to 14 (#34317)
We're upgrading embedded Postgres from 13 to 14, and this PR includes a
script to perform the upgrade of the data folder from v13 schema to v14
schema. This script temporarily installs Postgres 13, if not available,
for the upgrade process, so will continue to work when and if we choose
to remove `postgresql-13` from the base image.
Tested this manually as well, running an Appsmith with Postgres 13,
executing some workflows via webhook, getting some run data generated,
then upgrading Postgres with the script in this PR, and ensuring that
the workflow run history is still there and visible on the UI exactly
the same. It is.
No conflicts or additional changes needed on EE. [All server and Cypress
tests pass on EE](https://github.com/appsmithorg/appsmith-ee/pull/4493).

**/test sanity**
<!-- This is an auto-generated comment: Cypress test results -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9590240540>
> Commit: 9c75da53f871ffb912015c18a7504327cba88f2c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9590240540&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
<!-- end of auto-generated comment: Cypress test results -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added automation script for upgrading PostgreSQL to the latest
version.
- Introduced testing script for PostgreSQL upgrades in Docker
environments.
- **Improvements**
- Upgraded PostgreSQL from version 13 to 14 in Docker setup, ensuring
compatibility and performance enhancements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-21 14:04:08 +00:00
|
|
|
ENV PATH="/usr/lib/postgresql/14/bin:${PATH}"
|
2024-06-17 07:23:34 +00:00
|
|
|
|
2023-10-18 08:47:38 +00:00
|
|
|
# Install Java
|
|
|
|
|
RUN set -o xtrace \
|
|
|
|
|
&& mkdir -p /opt/java \
|
|
|
|
|
# Assets from https://github.com/adoptium/temurin17-binaries/releases
|
2023-11-07 05:05:50 +00:00
|
|
|
# TODO: The release jdk-17.0.9+9.1 doesn't include Linux binaries, so this fails.
|
|
|
|
|
# Temporarily using hardcoded version in URL until we figure out a more elaborate/smarter solution.
|
|
|
|
|
#&& version="$(curl --write-out '%{redirect_url}' 'https://github.com/adoptium/temurin17-binaries/releases/latest' | sed 's,.*jdk-,,')" \
|
|
|
|
|
&& version="17.0.9+9" \
|
2024-01-09 01:40:46 +00:00
|
|
|
&& curl --location "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" \
|
|
|
|
|
| tar -xz -C /opt/java --strip-components 1
|
2023-10-18 08:47:38 +00:00
|
|
|
|
|
|
|
|
# Install NodeJS
|
2024-11-14 09:15:48 +00:00
|
|
|
RUN <<END
|
|
|
|
|
set -eo xtrace
|
|
|
|
|
|
|
|
|
|
mkdir -p /opt/node
|
|
|
|
|
arch="$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/')"
|
|
|
|
|
|
|
|
|
|
curl -LOsS "https://nodejs.org/dist/latest-v20.x/SHASUMS256.txt"
|
|
|
|
|
filename="$(awk '/linux-'"$arch"'.tar.gz/ {print $2}' SHASUMS256.txt)"
|
|
|
|
|
|
|
|
|
|
curl -LOsS "https://nodejs.org/dist/latest-v20.x/$filename"
|
|
|
|
|
grep "$filename" SHASUMS256.txt | sha256sum -c -
|
|
|
|
|
tar -xzf "$filename" -C /opt/node --strip-components 1
|
|
|
|
|
|
|
|
|
|
rm "$filename" SHASUMS256.txt
|
|
|
|
|
END
|
2023-10-18 08:47:38 +00:00
|
|
|
|
2023-12-01 10:54:37 +00:00
|
|
|
# Install Caddy
|
2024-05-21 11:16:13 +00:00
|
|
|
RUN set -o xtrace \
|
|
|
|
|
&& mkdir -p /opt/caddy \
|
|
|
|
|
&& version="$(curl --write-out '%{redirect_url}' 'https://github.com/caddyserver/caddy/releases/latest' | sed 's,.*/v,,')" \
|
|
|
|
|
&& curl --location "https://github.com/caddyserver/caddy/releases/download/v$version/caddy_${version}_linux_$(uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/').tar.gz" \
|
|
|
|
|
| tar -xz -C /opt/caddy
|
|
|
|
|
|
|
|
|
|
RUN mv /opt/caddy/caddy /opt/caddy/caddy_vanilla
|
|
|
|
|
|
2024-03-05 09:37:22 +00:00
|
|
|
COPY --from=caddybuilder /usr/bin/caddy /opt/caddy/caddy
|
2023-12-01 10:54:37 +00:00
|
|
|
|
2023-12-21 05:52:41 +00:00
|
|
|
# Clean up
|
2023-10-18 08:47:38 +00:00
|
|
|
RUN rm -rf \
|
|
|
|
|
/root/.cache \
|
|
|
|
|
/root/.npm \
|
|
|
|
|
/usr/local/share/doc \
|
|
|
|
|
/usr/share/doc \
|
|
|
|
|
/usr/share/man \
|
|
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
|
/tmp/*
|
|
|
|
|
|
|
|
|
|
VOLUME [ "/appsmith-stacks" ]
|
|
|
|
|
|
|
|
|
|
ENV TMP="/tmp/appsmith"
|
2023-12-01 12:12:03 +00:00
|
|
|
ENV WWW_PATH="$TMP/www"
|