name: neosync include: - path: ./compose/temporal/compose.yml env_file: - ./compose/temporal/.env - path: ./compose/compose-db.yml # - path: ./compose/compose-db-mysql.yml # - path: ./compose/compose-db-mongo.yml # - path: ./compose/compose-db-dynamo.yml # - path: ./compose/compose-db-mssql.yml services: app: container_name: neosync-app image: ghcr.io/nucleuscloud/neosync/app:latest ports: - 3000:3000 environment: - HOSTNAME=0.0.0.0 - NUCLEUS_ENV=dev - NEXTAUTH_SECRET=foo - NEXTAUTH_URL=http://localhost:3000 - NEOSYNC_API_BASE_URL=http://api:8080 - NEXT_PUBLIC_APP_BASE_URL=http://localhost:3000 - POSTHOG_KEY=phc_qju45RhNvCDwYVdRyUjtWuWsOmLFaQZi3fmztMBaJip - AUTH_ENABLED=false networks: - neosync-network db: container_name: neosync-db image: postgres:15 ports: - 5432:5432 environment: - POSTGRES_DB=nucleus - POSTGRES_PASSWORD=foofar - PGUSER=postgres healthcheck: test: ['CMD', 'pg_isready'] interval: 10s timeout: 5s retries: 5 networks: - neosync-network volumes: - neosync_pg_data:/var/lib/postgresql/data - ./scripts/pg-init:/docker-entrypoint-initdb.d api: container_name: neosync-api image: ghcr.io/nucleuscloud/neosync/api:latest ports: - 8080:8080 command: serve connect environment: - HOST=0.0.0.0 - PORT=8080 - NUCLEUS_ENV=dev - APP_BASEURL=http://localhost:3000 - TEMPORAL_URL=temporal:7233 - DB_AUTO_MIGRATE=true - DB_SCHEMA_DIR=/migrations - DB_HOST=db - DB_PORT=5432 - DB_NAME=nucleus - DB_USER=postgres - DB_PASS=foofar - DB_SSL_DISABLE=true - DB_MIGRATIONS_TABLE=neosync_api_schema_migrations - DB_MIGRATIONS_TABLE_QUOTED=false - AUTH_ENABLED=false networks: - neosync-network - temporal-network restart: on-failure depends_on: db: condition: service_healthy restart: true api-seed: container_name: neosync-api-seed image: postgres:15 entrypoint: > /bin/sh -c "./scripts/wait-for-it.sh api:8080 -- psql 'postgresql://postgres:foofar@neosync-db:5432/nucleus?sslmode=disable' -f /scripts/seed.sql" volumes: - ./scripts/seed-neosync.sql:/scripts/seed.sql - ./scripts/wait-for-it.sh:/scripts/wait-for-it.sh depends_on: - api networks: - neosync-network temporal-seed: container_name: neosync-temporal-seed image: temporalio/admin-tools:1.26.2 environment: - TEMPORAL_ADDRESS=temporal:7233 entrypoint: /bin/sh -c "/create_schedules.sh" volumes: - ./scripts/create_schedules.sh:/create_schedules.sh depends_on: - api networks: - neosync-network - temporal-network worker: container_name: neosync-worker image: ghcr.io/nucleuscloud/neosync/worker:latest environment: - NUCLEUS_ENV=dev - TEMPORAL_URL=temporal:7233 - TEMPORAL_NAMESPACE=default - TEMPORAL_TASK_QUEUE=sync-job - NEOSYNC_URL=http://api:8080 - REDIS_URL=redis://default:foofar@redis:6379 - TABLESYNC_MAX_CONCURRENCY=3 networks: - neosync-network - temporal-network restart: on-failure redis: container_name: neosync-redis image: redis:7.2.4 ports: - 6379:6379 command: redis-server --save 20 1 --loglevel warning --requirepass foofar networks: - neosync-network volumes: - neosync_redis_cache:/data volumes: neosync_redis_cache: neosync_pg_data: networks: neosync-network: name: neosync-network