-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
71 lines (68 loc) · 1.92 KB
/
docker-compose.yaml
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
version: '3.8'
services:
db:
image: postgres:15.1-alpine3.16
container_name: diagranastext-db
volumes:
- ./server/sql/core.sql:/docker-entrypoint-initdb.d/core.sql
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "6432:5432"
restart: always
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres", "-d", "postgres" ]
interval: 1s
timeout: 5s
retries: 10
pgweb:
container_name: pgweb
restart: always
image: sosedoff/pgweb
ports:
- "9081:8081"
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/postgres?sslmode=disable
depends_on:
db:
condition: service_healthy
server:
depends_on:
db:
condition: service_healthy
image: diagranastext-core
container_name: diagranastext-core
build:
context: ./server/core
dockerfile: Dockerfile
environment:
MODEL_API_KEY: ${OPENAI_API_KEY}
MODEL_MAX_TOKENS: 500
SSL_MODE: disable
DB_HOST: 'db:5432'
DB_DBNAME: postgres
DB_USER: postgres
DB_PASSWORD: postgres
CORS_HEADERS: '{"Access-Control-Allow-Origin":"http://localhost:${PORT_CLIENT}","Access-Control-Allow-Methods":"POST,OPTIONS","Access-Control-Allow-Headers":"Content-Type,Authorization"}'
PORT: 9000
GOOGLE_APPLICATION_CREDENTIALS: '/key.json'
# set dev environment to generate CIAM crypto keys to sign and validate JWT
ENV: dev
ports:
- ${PORT_SERVER}:9000
volumes:
- ./dummy-key.json:/key.json
webclient:
image: node:current-alpine3.17
container_name: diagranastext-webclient
environment:
VITE_URL_API: "http://localhost:${PORT_SERVER}"
VITE_VERSION: $VERSION
ports:
- ${PORT_CLIENT}:9001
volumes:
- ./webclient:/app
working_dir: /app
entrypoint: "/bin/sh"
command: [ "-c", "npm install && npm run dev"]