-
Notifications
You must be signed in to change notification settings - Fork 131
/
compose.dev.yml
170 lines (156 loc) · 4.27 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
build:
context: ./
dockerfile: ./frontend/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
env_file:
- path: ./.env.app.local
required: false
networks:
- neosync-network
volumes:
- ./frontend:/app/:rw
- neosync_app_nodemodules:/app/node_modules
- neosync_web_nodemodules:/app/apps/web/node_modules
- neosync_sdk_nodemodules:/app/packages/sdk/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
build:
context: ./
dockerfile: ./backend/dev/build/Dockerfile.dev
ports:
- 8080:8080
environment:
- HOST=0.0.0.0
- PORT=8080
- NUCLEUS_ENV=dev
- TEMPORAL_URL=temporal:7233
- DB_AUTO_MIGRATE=true
- DB_SCHEMA_DIR=/workspace/backend/sql/postgresql/schema
- 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
- LOG_LEVEL=DEBUG
- DB_LOG_LEVEL=ERROR
- AUTH_ENABLED=false
env_file:
- path: ./.env.api.local
required: false
networks:
- neosync-network
- temporal-network
depends_on:
db:
condition: service_healthy
restart: true
volumes:
- ./backend:/workspace/backend:rw
- ./worker:/workspace/worker:rw
- ./internal:/workspace/internal:rw
- ./go.mod:/workspace/go.mod:rw
- ./go.sum:/workspace/go.sum:rw
- neosync_api_tmp:/workspace/tmp
- neosync_go_mod_cache:/go/pkg/mod
- neosync_backend_build_cache:/root/.cache/go-build
restart: on-failure
worker:
container_name: neosync-worker
build:
context: ./
dockerfile: ./worker/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=DEBUG
- DB_LOG_LEVEL=ERROR
networks:
- neosync-network
- temporal-network
depends_on:
temporal:
condition: service_healthy
restart: true
volumes:
- ./backend:/workspace/backend:rw
- ./worker:/workspace/worker:rw
- ./internal:/workspace/internal:rw
- ./go.mod:/workspace/go.mod:rw
- ./go.sum:/workspace/go.sum:rw
- neosync_worker_tmp:/workspace/tmp
- neosync_go_mod_cache:/go/pkg/mod
- neosync_worker_build_cache:/root/.cache/go-build
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:
neosync_api_tmp:
neosync_backend_build_cache:
neosync_worker_tmp:
neosync_worker_build_cache:
neosync_go_mod_cache:
neosync_app_nodemodules:
neosync_web_nodemodules:
neosync_sdk_nodemodules:
networks:
neosync-network:
name: neosync-network