The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Add Hasura
Charles Bochet9fb4f211808b
diff --git a/.circleci/config.yml b/.circleci/config.ymlindex 99ebc88031d..1eea705e176 100644--- a/.circleci/config.yml+++ b/.circleci/config.yml@@ -6,8 +6,13 @@ orbs:slack: circleci/[email protected]node: circleci/[email protected]+parameters:+ build-api:+ type: boolean+ default: false+jobs:- tests:+ tests-server:executor: node/defaultsteps:- checkout@@ -19,17 +24,17 @@ jobs:name: testsworkflows:- build-and-deploy:+ build-and-deploy-server:jobs:- - tests+ - tests-server- aws-ecr/build-and-push-image:- name: build-image+ name: build-image-serverfilters:branches:only: mainrequires:- - tests- dockerfile: ./infra/prod/Dockerfile+ - tests-server+ dockerfile: ./infra/prod/twenty-server/Dockerfileregistry-id: AWS_ACCOUNT_IDaws-access-key-id: AWS_ACCESS_KEY_IDaws-secret-access-key: AWS_SECRET_ACCESS_KEY@@ -37,28 +42,28 @@ workflows:repo: $AWS_ECR_REPOtag: $CIRCLE_SHA1- aws-ecs/deploy-service-update:- name: deploy-canary+ name: deploy-server-canaryrequires:- - build-image- family: $AWS_ECS_CONTAINER_NAME_CANARY+ - build-image-server+ family: $AWS_ECS_CONTAINER_NAME_SERVER_CANARYcluster: $AWS_ECS_CLUSTER- container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_CANARY,tag=${CIRCLE_SHA1}"+ container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_SERVER_CANARY,tag=${CIRCLE_SHA1}"- slack/on-hold:name: slack-notificationcontext: slack-secretsrequires:- - deploy-canary+ - deploy-server-canary- hold:type: approvalrequires:- slack-notification- aws-ecs/deploy-service-update:- name: deploy-prod+ name: deploy-server-defaultrequires:- hold- family: $AWS_ECS_CONTAINER_NAME_DEFAULT+ family: $AWS_ECS_CONTAINER_NAME_SERVER_DEFAULTcluster: $AWS_ECS_CLUSTER- container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_DEFAULT,tag=${CIRCLE_SHA1}"+ container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_SERVER_DEFAULT,tag=${CIRCLE_SHA1}"post-steps:- slack/notify:event: pass@@ -69,11 +74,53 @@ workflows:- aws-ecr/build-and-push-image:name: build-image-latestrequires:- - deploy-prod- dockerfile: ./infra/prod/Dockerfile+ - deploy-server-default+ dockerfile: ./infra/prod/twenty-server/Dockerfileregistry-id: AWS_ACCOUNT_IDaws-access-key-id: AWS_ACCESS_KEY_IDaws-secret-access-key: AWS_SECRET_ACCESS_KEYregion: $AWS_REGIONrepo: $AWS_ECR_REPOtag: latest++ build-and-deploy-api:+ when: << pipeline.parameters.build-api >>+ jobs:+ - aws-ecr/build-and-push-image:+ name: build-image-api+ dockerfile: ./infra/prod/twenty-api/Dockerfile+ registry-id: AWS_ACCOUNT_ID+ aws-access-key-id: AWS_ACCESS_KEY_ID+ aws-secret-access-key: AWS_SECRET_ACCESS_KEY+ region: $AWS_REGION+ repo: $AWS_ECR_REPO_API+ tag: $CIRCLE_SHA1+ - aws-ecs/deploy-service-update:+ name: deploy-api-canary+ requires:+ - build-image-api+ family: $AWS_ECS_CONTAINER_NAME_API_CANARY+ cluster: $AWS_ECS_CLUSTER+ container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_API_CANARY,tag=${CIRCLE_SHA1}"+ - hold:+ type: approval+ requires:+ - deploy-api-canary+ - aws-ecs/deploy-service-update:+ name: deploy-api-default+ requires:+ - hold+ family: $AWS_ECS_CONTAINER_NAME_API_DEFAULT+ cluster: $AWS_ECS_CLUSTER+ container-image-name-updates: "container=$AWS_ECS_CONTAINER_NAME_API_DEFAULT,tag=${CIRCLE_SHA1}"+ - aws-ecr/build-and-push-image:+ name: build-image-api-latest+ requires:+ - deploy-api-default+ dockerfile: ./infra/prod/twenty-api/Dockerfile+ registry-id: AWS_ACCOUNT_ID+ aws-access-key-id: AWS_ACCESS_KEY_ID+ aws-secret-access-key: AWS_SECRET_ACCESS_KEY+ region: $AWS_REGION+ repo: $AWS_ECR_REPO_API+ tag: latestdiff --git a/infra/dev/docker-compose.yml b/infra/dev/docker-compose.ymlindex 6fe72880d3c..9d216d0c16b 100644--- a/infra/dev/docker-compose.yml+++ b/infra/dev/docker-compose.yml@@ -9,7 +9,7 @@ services:depends_on:- postgrestwenty-api:- image: hasura/graphql-engine:latest+ build: ./twenty-apiports:- "8080:8080"depends_on:diff --git a/infra/dev/twenty-api/Dockerfile b/infra/dev/twenty-api/Dockerfilenew file mode 100644index 00000000000..3da6192ddae--- /dev/null+++ b/infra/dev/twenty-api/Dockerfile@@ -0,0 +1,3 @@+FROM hasura/graphql-engine:latest as api++CMD ["sh", "-c", "graphql-engine serve"]diff --git a/infra/prod/twenty-api/Dockerfile b/infra/prod/twenty-api/Dockerfilenew file mode 100644index 00000000000..3da6192ddae--- /dev/null+++ b/infra/prod/twenty-api/Dockerfile@@ -0,0 +1,3 @@+FROM hasura/graphql-engine:latest as api++CMD ["sh", "-c", "graphql-engine serve"]diff --git a/infra/prod/Dockerfile b/infra/prod/twenty-server/Dockerfilesimilarity index 100%rename from infra/prod/Dockerfilerename to infra/prod/twenty-server/Dockerfile