forked from nucleuscloud/neosync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.dev.yml
148 lines (134 loc) · 3.3 KB
/
compose.dev.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
148
name: neosync
include:
- path: ./compose/temporal/compose.yml
env_file:
- ./compose/temporal/.env
- path: ./compose/compose-db.yml
# - path: ./compose/compose-db-mysql.yml
services:
app:
container_name: neosync-app
image: neosync-app
build:
context: ./frontend
dockerfile: ./apps/web/dev/build/Dockerfile.dev
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
develop:
watch:
- path: frontend/package.json
action: rebuild
- path: frontend/package-lock.json
action: rebuild
- path: frontend/
action: sync
target: /app
ignore:
- frontend/node_modules/
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: neosync-api
build:
context: ./backend
dockerfile: ./dev/build/Dockerfile.dev
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=/app/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
depends_on:
db:
condition: service_healthy
restart: true
develop:
watch:
- path: backend/bin
action: rebuild
target: /app
restart: on-failure
worker:
container_name: neosync-worker
image: neosync-worker
build:
context: ./worker
dockerfile: ./dev/build/Dockerfile.dev
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
- LOG_LEVEL=INFO
networks:
- neosync-network
- temporal-network
develop:
watch:
- path: worker/bin
action: rebuild
target: /app
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