twenty/infra/dev/docker-compose.yml
2023-04-21 14:07:02 +02:00

94 lines
2.8 KiB
YAML

version: "3.9"
services:
twenty-front:
build:
context: ../..
dockerfile: ./infra/dev/front/Dockerfile
ports:
- "3001:3001"
- "6006:6006"
environment:
- REACT_APP_API_URL=${FRONT_REACT_APP_API_URL}
- REACT_APP_AUTH_URL=${FRONT_REACT_APP_AUTH_URL}
volumes:
- ../../front:/app/front
- twenty_node_modules_front:/app/front/node_modules
depends_on:
- postgres
twenty-hasura:
build: ./hasura
ports:
- "8080:8080"
- "9695:9695"
- "9693:9693"
volumes:
- ../../hasura:/hasura
- /hasura/entrypoints
depends_on:
- "postgres"
restart: always
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/hasura
HASURA_GRAPHQL_PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/default
HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: secret
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256", "key": "jwt-very-long-hard-to-guess-secret"}'
hasura-auth:
image: nhost/hasura-auth:0.19.1
ports:
- "4000:4000"
environment:
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256", "key": "jwt-very-long-hard-to-guess-secret"}'
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/default
HASURA_GRAPHQL_GRAPHQL_URL: http://twenty-hasura:8080/v1/graphql
HASURA_GRAPHQL_ADMIN_SECRET: secret
npm_package_version: '0'
AUTH_SMTP_HOST: mailhog
AUTH_SMTP_PORT: 1025
AUTH_SERVER_URL: ${HASURA_AUTH_SERVER_URL}
AUTH_CLIENT_URL: ${HASURA_AUTH_CLIENT_URL}
AUTH_PROVIDER_GOOGLE_ENABLED: true
AUTH_PROVIDER_GOOGLE_CLIENT_ID: ${HASURA_AUTH_PROVIDER_GOOGLE_CLIENT_ID}
AUTH_PROVIDER_GOOGLE_CLIENT_SECRET: ${HASURA_AUTH_PROVIDER_GOOGLE_CLIENT_SECRET}
AUTH_PROVIDER_GOOGLE_SCOPE: email,profile
depends_on:
- "twenty-hasura"
- "postgres"
- "mailhog"
mailhog:
image: jcalonso/mailhog
environment:
SMTP_HOST: mailhog
SMTP_PORT: 1025
SMTP_PASS: smtp-secret
SMTP_USER: smtp-user
SMTP_SECURE: "false"
SMTP_SENDER: auth@localhost
ports:
- "1025:1025"
- "8025:8025"
twenty-server:
build:
context: ../..
dockerfile: ./infra/dev/server/Dockerfile
ports:
- "3000:3000"
volumes:
- ../../server:/app/server
- twenty_node_modules_server:/app/server/node_modules
depends_on:
- postgres
postgres:
build: ./postgres
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
ports:
- "5432:5432"
volumes:
db_data:
twenty_node_modules_front:
twenty_node_modules_server: