[Wip] Update CI CD (#2945)
* Update CI and CD scripts * Fix docker docs build * Fix CD * Fix CD * Update front build and add postgres intel pg_graphql files * Fix postgres install * Fix * Update docs
This commit is contained in:
@ -18,25 +18,14 @@ services:
|
||||
- twenty_dev_node_modules_server:/app/packages/twenty-server/node_modules
|
||||
depends_on:
|
||||
- postgres
|
||||
twenty-docs:
|
||||
build:
|
||||
context: ../../..
|
||||
dockerfile: ./packages/twenty-docker/dev/twenty-docs/Dockerfile
|
||||
ports:
|
||||
- "5001:5001"
|
||||
volumes:
|
||||
- ../../../packages/twenty-docs:/app/packages/twenty-docs
|
||||
- twenty_docs_node_modules_root:/app/node_modules
|
||||
- twenty_docs_node_modules_yarn:/app/.yarn
|
||||
- twenty_docs_node_modules_docs:/app/packages/twenty-docs/node_modules
|
||||
postgres:
|
||||
container_name: twenty_postgres
|
||||
build: ./postgres
|
||||
image: twentycrm/twenty-postgres:latest
|
||||
volumes:
|
||||
- twenty_db_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_USER=twenty
|
||||
- POSTGRES_PASSWORD=twenty
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
- POSTGRES_DB=default
|
||||
ports:
|
||||
- "5432:5432"
|
||||
@ -47,6 +36,4 @@ volumes:
|
||||
twenty_dev_node_modules_yarn:
|
||||
twenty_dev_node_modules_front:
|
||||
twenty_dev_node_modules_server:
|
||||
twenty_docs_node_modules_root:
|
||||
twenty_docs_node_modules_yarn:
|
||||
twenty_docs_node_modules_docs:
|
||||
twenty_dev_node_modules_docs:
|
||||
|
||||
@ -1,35 +0,0 @@
|
||||
ARG PG_MAIN_VERSION=15.5
|
||||
|
||||
FROM postgres:${PG_MAIN_VERSION}-bullseye as postgres
|
||||
|
||||
ARG PG_MAIN_VERSION=15
|
||||
ARG PG_GRAPHQL_VERSION=1.4.2
|
||||
ARG WRAPPERS_VERSION=0.2.0
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN set -eux; \
|
||||
ARCH="$(dpkg --print-architecture)"; \
|
||||
case "${ARCH}" in \
|
||||
aarch64|arm64) \
|
||||
TARGETARCH='arm64'; \
|
||||
;; \
|
||||
amd64|x86_64) \
|
||||
TARGETARCH='amd64'; \
|
||||
;; \
|
||||
*) \
|
||||
echo "Unsupported arch: ${ARCH}"; \
|
||||
exit 1; \
|
||||
;; \
|
||||
esac;
|
||||
|
||||
RUN apt update && apt install curl -y
|
||||
|
||||
# Install precompiled pg_graphql extensions
|
||||
RUN curl -L "https://github.com/supabase/pg_graphql/releases/download/v${PG_GRAPHQL_VERSION}/pg_graphql-v${PG_GRAPHQL_VERSION}-pg${PG_MAIN_VERSION}-${TARGETARCH}-linux-gnu.deb" -o pg_graphql.deb
|
||||
RUN dpkg --install pg_graphql.deb
|
||||
|
||||
# Install precompiled supabase wrappers extensions
|
||||
RUN curl -L "https://github.com/supabase/wrappers/releases/download/v${WRAPPERS_VERSION}/wrappers-v${WRAPPERS_VERSION}-pg${PG_MAIN_VERSION}-${TARGETARCH}-linux-gnu.deb" -o wrappers.deb
|
||||
RUN dpkg --install wrappers.deb
|
||||
|
||||
COPY init.sql /docker-entrypoint-initdb.d/
|
||||
@ -1,10 +0,0 @@
|
||||
SELECT 'CREATE DATABASE "default"'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'default')\gexec
|
||||
|
||||
SELECT 'CREATE DATABASE "test"'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'test')\gexec
|
||||
|
||||
SELECT 'CREATE USER twenty PASSWORD ''twenty'''
|
||||
WHERE NOT EXISTS (SELECT FROM pg_user WHERE usename = 'twenty')\gexec
|
||||
|
||||
SELECT 'ALTER ROLE twenty superuser'\gexec
|
||||
@ -1,16 +1,14 @@
|
||||
FROM node:18.16-bullseye as twenty-dev
|
||||
|
||||
WORKDIR /app
|
||||
COPY ../../../../package.json .
|
||||
COPY ../../../../yarn.lock .
|
||||
COPY ../../../../.yarnrc.yml .
|
||||
COPY ../../../../.yarn/releases /app/.yarn/releases
|
||||
COPY ../../../packages/twenty-front/package.json /app/packages/twenty-front/package.json
|
||||
COPY ../../../packages/twenty-server/package.json /app/packages/twenty-server/package.json
|
||||
COPY ../../../packages/twenty-server/patches /app/packages/twenty-server/patches
|
||||
COPY ../../../packages/eslint-plugin-twenty/package.json /app/packages/eslint-plugin-twenty/package.json
|
||||
|
||||
RUN yarn
|
||||
COPY ./package.json .
|
||||
COPY ./yarn.lock .
|
||||
COPY ./.yarnrc.yml .
|
||||
COPY ./.yarn/releases /app/.yarn/releases
|
||||
COPY ./packages/twenty-front/package.json /app/packages/twenty-front/package.json
|
||||
COPY ./packages/twenty-server/package.json /app/packages/twenty-server/package.json
|
||||
COPY ./packages/twenty-server/patches /app/packages/twenty-server/patches
|
||||
COPY ./packages/eslint-plugin-twenty/package.json /app/packages/eslint-plugin-twenty/package.json
|
||||
|
||||
RUN npx playwright install-deps
|
||||
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
FROM node:18.16-bullseye as twenty-docs
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ../../../../package.json .
|
||||
COPY ../../../../yarn.lock .
|
||||
COPY ../../../../.yarnrc.yml .
|
||||
COPY ../../../../.yarn/releases /app/.yarn/releases
|
||||
COPY ../../../packages/twenty-docs/package.json /app/packages/twenty-docs/package.json
|
||||
|
||||
RUN yarn
|
||||
|
||||
WORKDIR /app/packages/twenty-docs
|
||||
|
||||
CMD ["tail", "-f", "/dev/null"]
|
||||
Reference in New Issue
Block a user