-
Notifications
You must be signed in to change notification settings - Fork 120
/
compose.yml
147 lines (131 loc) · 3.55 KB
/
compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
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
- 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.23.0
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
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