-
-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
167 lines (164 loc) · 4.46 KB
/
docker-compose.yml
File metadata and controls
167 lines (164 loc) · 4.46 KB
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
# NOTE: If you're selfhosting, you'll find it much easier (and more performant) to use the proper selfhosted
# dockerfile that exists here: https://github.com/julianpoy/recipesage-selfhost
x-common-env: &common-env
LOG_LEVEL: "info"
AWS_REGION: us-west-2
AWS_BUCKET_RECIPE_IMAGE: chefbook-dev
AWS_BUCKET_PROFILE_IMAGE: chefbook-dev
AWS_BUCKET_IMPORT_DATA: chefbook-dev-import-data
AWS_BUCKET_DATA_EXPORT: chefbook-dev-data-export
STORAGE_TYPE: s3
NODE_ENV: development
ENVIRONMENT: development
VERBOSE: "false"
VERSION: development
POSTGRES_DB: recipesage_dev
POSTGRES_USER: recipesage_dev
POSTGRES_PASSWORD: recipesage_dev
POSTGRES_PORT: "5432"
POSTGRES_HOST: postgres
POSTGRES_SSL: "false"
POSTGRES_LOGGING: "true"
DATABASE_URL: postgresql://recipesage_dev:recipesage_dev@postgres:5432/recipesage_dev
GRIP_URL: http://pushpin:5561/
GRIP_KEY: changeme
SEARCH_PROVIDER: typesense
TYPESENSE_NODES: '[{"host": "typesense", "port": 8108, "protocol": "http"}]'
TYPESENSE_API_KEY: recipesage_dev
BROWSERLESS_HOST: browserless
BROWSERLESS_PORT: "3000"
BROWSERLESS_TOKEN: recipesage_dev
JOB_QUEUE_REDIS_HOST: valkey
INGREDIENT_INSTRUCTION_CLASSIFIER_URL: http://ingredient-instruction-classifier:3000/
GROCERY_CATEGORIZER_URL: http://grocery-categorizer:8000/
OTEL_LOG_LEVEL: info
FIREBASE_CREDENTIALS_PATH: /app/.credentials/firebase.json
RECIPECLIPPER_MINISERVER_URL: http://recipeclipper-miniserver:3000/
NX_DAEMON: "true"
services:
proxy:
image: nginx
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- "80:80"
command: nginx -g 'daemon off;'
depends_on:
- frontend
- www
- backend
- pushpin
stop_grace_period: 1s
frontend:
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ./packages:/app/packages
ports:
- "8100:8100"
command: npx nx start frontend
environment:
- ENVIRONMENT=development
- APP_VERSION=development
ulimits:
core:
soft: 0
hard: 0
stop_grace_period: 1s
www:
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ./packages:/app/packages
ports:
- "4321:4321"
command: npx nx dev www
environment:
- ENVIRONMENT=development
stop_grace_period: 1s
backend:
depends_on:
- postgres
- pushpin
- browserless
- grocery-categorizer
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ./packages:/app/packages
- ./.credentials:/app/.credentials
command: node_modules/nx/bin/nx.js serve backend
environment:
<<: *common-env
env_file:
- ./.env
stop_grace_period: 1s
queue-worker:
depends_on:
- postgres
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ./packages:/app/packages
- ./.credentials:/app/.credentials
command: node_modules/nx/bin/nx.js serve queue-worker
environment:
<<: *common-env
NODE_OPTIONS: --max-old-space-size=2000
env_file:
- ./.env
stop_grace_period: 1s
typesense:
image: typesense/typesense:0.24.1
volumes:
- typesense-data:/data
command: "--data-dir /data --api-key=recipesage_dev --enable-cors"
pushpin:
image: julianpoy/pushpin:2023-09-17
entrypoint: /bin/sh -c
command:
[
'sed -i "s/sig_key=changeme/sig_key=$$GRIP_KEY/" /etc/pushpin/pushpin.conf && echo "* $${TARGET},over_http" > /etc/pushpin/routes && pushpin --merge-output',
]
environment:
- GRIP_KEY=changeme
- TARGET=backend:3000
stop_grace_period: 1s
postgres:
image: postgres:16.1
command:
- "postgres"
- "-c"
- "wal_level=logical"
ports:
- 5432:5432
environment:
- POSTGRES_DB=recipesage_dev
- POSTGRES_USER=recipesage_dev
- POSTGRES_PASSWORD=recipesage_dev
browserless:
image: ghcr.io/browserless/chromium:v2.38.2
environment:
- CONCURRENT=3
- QUEUED=10
- HEALTH=true
- MAX_MEMORY_PERCENT=80
- TOKEN=recipesage_dev
stop_grace_period: 1s
valkey:
image: valkey/valkey
ingredient-instruction-classifier:
image: julianpoy/ingredient-instruction-classifier:1.4.9
stop_grace_period: 1s
grocery-categorizer:
image: julianpoy/ingredient-categorizer:latest
stop_grace_period: 1s
recipeclipper-miniserver:
image: julianpoy/recipeclipper-miniserver:1.2.0
stop_grace_period: 1s
volumes:
typesense-data: