Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): Test v7.19.7 #9484

Merged
merged 40 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a0af0c1
chore(env vars): Stripe vars moved to the Integrations section (#9427)
rafaelromcar-parabol Feb 15, 2024
c0a2fdf
chore: fix misleading `isLead` field name on `Team` (#9413)
Dschoordsch Feb 16, 2024
f042628
feat: remove team template limit (#9424)
nickoferrall Feb 19, 2024
02dc6fa
feat: Add Google calendar meeting series for recurrence (#9380)
Dschoordsch Feb 20, 2024
b0b76f9
fix: Increase the number of projects fetched per request from Atlassi…
Dschoordsch Feb 20, 2024
c2a31e6
chore(deps): bump ip from 1.1.8 to 1.1.9 (#9442)
dependabot[bot] Feb 21, 2024
e4a831a
chore(release): release v7.17.0 (#9428)
parabol-release-bot[bot] Feb 22, 2024
61ba015
feat(standalone-deployment): Standalone host deployment improved and …
rafaelromcar-parabol Feb 22, 2024
92ab5be
feat: support env-defined saml issuer for PPMIs (#9455)
mattkrick Feb 26, 2024
c77925b
chore: Associate logs with traces (#9444)
Dschoordsch Feb 27, 2024
bd519c9
chore(release): release v7.18.0 (#9450)
parabol-release-bot[bot] Feb 27, 2024
6d46e1b
chore: no force-push to prod (#9401)
mattkrick Feb 27, 2024
b60ff4e
chore(release): release v7.18.1 (#9459)
parabol-release-bot[bot] Feb 27, 2024
55faa17
feat: embedder service (#9417)
jordanh Feb 27, 2024
1008578
merge production to avoid force push (#9461)
mattkrick Feb 27, 2024
20ca927
chore(release): release v7.19.0 (#9460)
parabol-release-bot[bot] Feb 27, 2024
7bd8803
fix: checkout prod before merging it (#9463)
mattkrick Feb 27, 2024
12ba80e
chore(release): release v7.19.1 (#9464)
parabol-release-bot[bot] Feb 28, 2024
9e90b9d
fix: mrege origin/production strategy (#9465)
mattkrick Feb 28, 2024
e67ca91
chore(release): release v7.19.2 (#9466)
parabol-release-bot[bot] Feb 28, 2024
581f0cf
fix: force push 5 (#9467)
mattkrick Feb 28, 2024
b52faf2
chore(release): release v7.19.3 (#9468)
parabol-release-bot[bot] Feb 28, 2024
5b9526c
fix: limit invites from spammers (#9416)
nickoferrall Feb 28, 2024
9cec00a
fix: Fetch Jira projects in parallel (#9456)
Dschoordsch Feb 28, 2024
00092ec
fix: replace lone surrogates in draft-js content (#9415)
mattkrick Feb 28, 2024
92f0be9
chore(deps): bump es5-ext from 0.10.62 to 0.10.64 (#9457)
dependabot[bot] Feb 28, 2024
1e0075e
fix: packages/server/package.json to reduce vulnerabilities (#9434)
adaniels-parabol Feb 28, 2024
fd833f5
fix: packages/server/package.json to reduce vulnerabilities (#9392)
adaniels-parabol Feb 28, 2024
fd75d3f
fix: packages/server/package.json to reduce vulnerabilities (#9298)
adaniels-parabol Feb 28, 2024
9441b27
chore(deps): bump follow-redirects from 1.14.8 to 1.15.4 (#9312)
dependabot[bot] Feb 28, 2024
7bfec91
chore: add upload to GCS step in ironbank (#9471)
dbumblis-parabol Feb 28, 2024
c1da6ba
chore(release): release v7.19.4 (#9470)
parabol-release-bot[bot] Feb 29, 2024
419d104
fix: Fix seasonal templates for leap years (#9476)
Dschoordsch Feb 29, 2024
ba67da8
chore(release): release v7.19.5 (#9477)
parabol-release-bot[bot] Feb 29, 2024
052acd1
fix: After parameter for meetingCount was ignored (#9479)
Dschoordsch Feb 29, 2024
5e356c2
chore(docker-build): simplify the docker build process and reduce doc…
rafaelromcar-parabol Feb 29, 2024
aa88da0
chore(release): release v7.19.6 (#9480)
parabol-release-bot[bot] Feb 29, 2024
2ff4a6e
fix(docker-build): home folder is /home/node now (#9482)
rafaelromcar-parabol Feb 29, 2024
9c44e23
chore(release): release v7.19.7 (#9483)
parabol-release-bot[bot] Feb 29, 2024
20d4cde
Merge remote-tracking branch 'origin/production' into release/v7.19.7
invalid-email-address Feb 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
PARABOL_DOCKERFILE: ./docker/parabol-ubi/docker-build/dockerfiles/pipeline.dockerfile
PARABOL_DOCKERFILE: ./docker/parabol-ubi/docker-build/dockerfiles/basic.dockerfile
PARABOL_BUILD_ENV_PATH: docker/parabol-ubi/docker-build/environments/pipeline
jobs:
build:
Expand Down Expand Up @@ -114,7 +114,6 @@ jobs:
context: .
build-args: |
"_NODE_VERSION=${{ env.NODE_VERSION }}"
"_SECURITY_ENABLED=true"
push: true
tags: |
"${{ secrets.GCP_AR_PARABOL_DEV }}:${{github.sha}}"
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.19.5"
".": "7.19.7"
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows conventions [outlined here](http://keepachangelog.com/).

## [7.19.7](https://github.com/ParabolInc/parabol/compare/v7.19.6...v7.19.7) (2024-02-29)


### Fixed

* **docker-build:** home folder is /home/node now ([#9482](https://github.com/ParabolInc/parabol/issues/9482)) ([2ff4a6e](https://github.com/ParabolInc/parabol/commit/2ff4a6e6328bf437a31e9ac7984af4a55aae3d11))

## [7.19.6](https://github.com/ParabolInc/parabol/compare/v7.19.5...v7.19.6) (2024-02-29)


### Fixed

* After parameter for meetingCount was ignored ([#9479](https://github.com/ParabolInc/parabol/issues/9479)) ([052acd1](https://github.com/ParabolInc/parabol/commit/052acd14035fe7c96af8d17ca4763be91d863a80))


### Changed

* **docker-build:** simplify the docker build process and reduce docker image size ([#9447](https://github.com/ParabolInc/parabol/issues/9447)) ([5e356c2](https://github.com/ParabolInc/parabol/commit/5e356c2566db8e32e45a1393e1b1ea27c4be0a5c))

## [7.19.5](https://github.com/ParabolInc/parabol/compare/v7.19.4...v7.19.5) (2024-02-29)


Expand Down
82 changes: 22 additions & 60 deletions docker/parabol-ubi/docker-build/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
# docker-image-parabol

This repo was created to build a **secure** Parabol base image that is **agnostic to configuration and can be used anywhere**. Once an image is built, it can be pushed to any repository.
This repo was created to build a Parabol base image that is **agnostic to configuration and can be used anywhere**. Once an image is built, it can be pushed to any repository.

There are two possible ways to build the application:

- **Standard build:** duild using local files, using the same Dockerfile and process used in our Docker Build pipeline.
- **Build from git:** build using a simplified process that downloads the source code and builds from scratch.

The processes are different and the details of it can be checked in both dockerfiles.

## Standard build

### Requirements
## Requirements

Required:

Expand All @@ -21,37 +12,35 @@ Required:

Recommended:

- jq installed.
- [jq](https://jqlang.github.io/jq/) installed. It is used to get the version of the application.

### Variables
## Variables

| Name | Description | Possible values | Recommended value |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------- |
| `postgresql_tag` | PostgreSQL version from the [Docker image](https://hub.docker.com/_/postgres) | `Any tag` | `15.4` |
| `rethinkdb_tag` | RethinkDB version from the [Docker image](https://hub.docker.com/_/rethinkdb) | `Any tag` | `2.4.2` |
| `redis_tag` | Redis version from the [Docker image](https://hub.docker.com/_/redis) | `Any tag` | `7.0-alpine` |
| `_BUILD_ENV_PATH` | File `.env` used by the application during the build process | `Relative path from the root level of the repository` | `docker/parabol-ubi/docker-build/environments/pipeline` |
| `_BUILD_ENV_PATH` | File `.env` used by the application during the build process | `Relative path from the root level of the repository` | `docker/parabol-ubi/docker-build/environments/basic-env` |
| `_NODE_VERSION` | Node version, used by Docker to use the Docker image node:\_NODE_VERSION as base image to build | `Same as in root package.json` | |
| `_DOCKERFILE` | Dockerfile used to build the image | `Relative path from the root level of the repository` | `./docker/parabol-ubi/docker-build/dockerfiles/pipeline.dockerfile` |
| `_SECURITY_ENABLED` | Enable or disable security configurations. It will add some MBs to the final image, but it will produce a secured image | `true/false` | `true` |
| `_DOCKERFILE` | Dockerfile used to build the image | `Relative path from the root level of the repository` | `./docker/parabol-ubi/docker-build/dockerfiles/basic.dockerfile` |
| `_DOCKER_REPOSITORY` | The destination repository | `String` | `parabol` |
| `_DOCKER_TAG` | Tag for the produced image | `String` | |

Example of variables:

```commandLine
export postgresql_tag=15.4-alpine; \
export postgresql_tag=15.4; \
export rethinkdb_tag=2.4.2; \
export redis_tag=7.0-alpine; \
export _BUILD_ENV_PATH=docker/parabol-ubi/docker-build/environments/pipeline; \
export _BUILD_ENV_PATH=docker/parabol-ubi/docker-build/environments/basic-env; \
export _NODE_VERSION=$(jq -r -j '.engines.node|ltrimstr("^")' package.json); \
export _DOCKERFILE=./docker/parabol-ubi/docker-build/dockerfiles/pipeline.dockerfile; \
export _SECURITY_ENABLED=true; \
export _DOCKERFILE=./docker/parabol-ubi/docker-build/dockerfiles/basic.dockerfile; \
export _DOCKER_REPOSITORY=parabol; \
export _DOCKER_TAG=test-image
```

### Building the image
## Building the image

The application must be already built locally using the command `yarn build --no-deps` mode.

Expand Down Expand Up @@ -90,7 +79,7 @@ yarn build --no-deps
- **Build the docker image:**

```commandLine
docker build -t $_DOCKER_REPOSITORY:$_DOCKER_TAG -f $_DOCKERFILE --build-arg _NODE_VERSION=$_NODE_VERSION --build-arg _SECURITY_ENABLED=$_SECURITY_ENABLED .
docker build -t $_DOCKER_REPOSITORY:$_DOCKER_TAG -f $_DOCKERFILE --build-arg _NODE_VERSION=$_NODE_VERSION .
```

> Some build tips
Expand Down Expand Up @@ -119,57 +108,30 @@ It will produce a Docker image tagged as `${_DOCKER_REPOSITORY}:${_DOCKER_TAG}`.
docker images $_DOCKER_REPOSITORY:$_DOCKER_TAG
```

## Build from git

This version of the Dockerfile downloads the application during the docker build process and differs in other
## Run the application using a docker image

Modify the version export below e.g. update vX.X.X and run the export command and the docker command. The command below will create a temp postgres container (this allows pgtype files to be generated) and then build the docker image with a temp .env file.
_Assumes redis, rethinkdb, and postgres already running to have operational stack._

- Change `environments/buildenv` connection string names form container names to localhost for local image build.
- Use `_PARABOL_GIT_REF` to select the reference in Parabol's Git repository. It can be any tag or branch, but it is recommended to use released tags as `v6.69.0`. By default it buils a local image using only `parabol` as repository.
- Use `_DOCKER_REPOSITORY` to build the image for a remote repository (ex: `gcr.io/parabol-proving-ground/parabol`)
- Use `_DOCKER_TAG` to define the tag for the new image.
The commands below will start a Parabol container on the target tag specified in \_DOCKER_TAG export. It will volume mount a .env in your current working directory to the container, so you can pass in any .env in your current working directory.

```commandLine
export postgresql_tag=15.4-alpine; \
export rethinkdb_tag=2.4.2; \
export redis_tag=7.0-alpine; \
export _BUILD_ENV_PATH=environments/local-buildenv \
export _NODE_VERSION=20.11.0 \
export _DOCKER_REPOSITORY=parabol \
export _PARABOL_GIT_REF=vX.X.X \
export _DOCKER_TAG=vX.X.X
```
For a more detailed how-to deploy Parabol, please go to the section [docker-host-st](https://github.com/ParabolInc/parabol/tree/master/docker/parabol-ubi/docker-host-st)

Now you can build the image
- Run the PreDeploy script

```commandLine
docker run --name temp-postgres --network=host -e POSTGRES_PASSWORD=temppassword -e POSTGRES_USER=tempuser -e POSTGRES_DB=tempdb -d -p 5432:5432 postgres:${postgresql_tag} && \
docker run --name temp-rethinkdb --network=host -d -p 28015:28015 -p 29015:29015 -p 8080:8080 rethinkdb:${rethinkdb_tag} && \
docker run --name temp-redis --network=host -d -p 6379:6379 redis:${redis_tag} && \
docker build --no-cache --network=host -t ${_DOCKER_REPOSITORY}:${_DOCKER_TAG} -f ./dockerfiles/parabol.dockerfile --build-arg _PARABOL_GIT_REF=${_PARABOL_GIT_REF} --build-arg _NODE_VERSION=$_NODE_VERSION --build-arg _BUILD_ENV_PATH=${_BUILD_ENV_PATH} . && \
docker stop temp-postgres temp-rethinkdb temp-redis && docker rm temp-postgres temp-rethinkdb temp-redis -f || docker stop temp-postgres temp-rethinkdb temp-redis && docker rm temp-postgres temp-rethinkdb temp-redis -f
```

If `_DOCKER_REPOSITORY` wasn't local and you want to push the image, you can run then:
export _DOCKER_REPOSITORY=parabol; \
export _DOCKER_TAG=vX.X.X

```commandLine
docker push ${_DOCKER_REPOSITORY}:${_DOCKER_TAG}
docker run --name=parabol-predeploy --network=host -v $(pwd)/.env:/home/node/parabol/.env ${_DOCKER_REPOSITORY}:${_DOCKER_TAG} /bin/bash -c "node dist/preDeploy.js"
```

## Run the application using a docker image

_Assumes redis, rethinkdb, and postgres already running to have operational stack._

The commands below will start a Parabol container on the target tag specified in \_DOCKER_TAG export. It will volume mount a .env in your current working directory to the container, so you can pass in any .env in your current working directory.

- Start GraphQL

```commandLine
export _DOCKER_REPOSITORY=parabol; \
export _DOCKER_TAG=vX.X.X

docker run --name=parabolgraphql --network=host -v $(pwd)/.env:/home/node/parabol/.env ${_DOCKER_REPOSITORY}:${_DOCKER_TAG} /bin/bash -c "yarn predeploy && NODE_ENV=production && node ./dist/gqlExecutor.js" || docker container rm parabolgraphql -f
docker run --name=parabol-gql-executor --network=host -v $(pwd)/.env:/home/node/parabol/.env ${_DOCKER_REPOSITORY}:${_DOCKER_TAG} /bin/bash -c "node ./dist/gqlExecutor.js" || docker container rm parabol-gql-executor -f
```

- Start Web Server
Expand All @@ -178,7 +140,7 @@ docker run --name=parabolgraphql --network=host -v $(pwd)/.env:/home/node/parabo
export _DOCKER_REPOSITORY=parabol; \
export _DOCKER_TAG=vX.X.X

docker run --name=parabol --network=host -v $(pwd)/.env:/home/node/parabol/.env -p 3000:3000 ${_DOCKER_REPOSITORY}:${_DOCKER_TAG} /bin/bash -c "yarn predeploy && NODE_ENV=production && node ./dist/web.js" || docker container rm parabol -f
docker run --name=parabol-web-server --network=host -v $(pwd)/.env:/home/node/parabol/.env -p 3000:3000 ${_DOCKER_REPOSITORY}:${_DOCKER_TAG} /bin/bash -c "node ./dist/web.js" || docker container rm parabol-web-server -f
```

To stop the container, just open another terminal and enter `docker container stop parabol`
To stop the container, just open another terminal and enter `docker container stop parabol-COMPONENT`
29 changes: 29 additions & 0 deletions docker/parabol-ubi/docker-build/dockerfiles/basic.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG _NODE_VERSION=${_NODE_VERSION}
FROM node:${_NODE_VERSION}-bookworm-slim as base

ENV HOME=/home/node \
USER=node

ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PORT=3000

COPY --chown=node --chmod=755 docker/parabol-ubi/docker-build/entrypoints/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY --chown=node docker/parabol-ubi/docker-build/tools/ip-to-server_id ${HOME}/tools/ip-to-server_id

# Required for pushToCDN to work with FILE_STORE_PROVIDER set to 'local'
RUN mkdir -p ${HOME}/parabol/self-hosted && \
chown node:node ${HOME}/parabol/self-hosted

COPY --chown=node .env.example ${HOME}/parabol/.env.example

# The application requires a yarn.lock file on the root folder to identify it
COPY --chown=node yarn.lock ${HOME}/parabol/yarn.lock
COPY --chown=node build ${HOME}/parabol/build
COPY --chown=node dist ${HOME}/parabol/dist

WORKDIR ${HOME}/parabol/

USER node
EXPOSE ${PORT}

ENTRYPOINT ["docker-entrypoint.sh"]
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# DO NOT DELETE. Legacy docker file for versions still in use. Delete only when all Parabol instances are using the newest docker image.
ARG _NODE_VERSION=${_NODE_VERSION}
#base build for dev deps
FROM node:${_NODE_VERSION} as base

ARG _PARABOL_GIT_REF=${_PARABOL_GIT_REF}
ARG _BUILD_ENV_PATH=environments/buildenv
ARG _BUILD_ENV_PATH=environments/legacy-build
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global

WORKDIR /home/node
Expand Down Expand Up @@ -45,7 +46,7 @@ COPY --from=base /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=base /opt /opt
COPY --from=base /home/node/parabol/ ${HOME}/parabol
RUN rm -rf ${HOME}/parabol/.env
COPY entrypoints/buildenv /usr/local/bin/docker-entrypoint.sh
COPY entrypoints/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY security /security

COPY ./tools/ip-to-server_id /home/node/tools/ip-to-server_id
Expand Down
Loading
Loading