-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (72 loc) · 2.01 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (72 loc) · 2.01 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
services:
db:
image: postgres:16
container_name: app-postgres
restart: unless-stopped
environment:
POSTGRES_DB: appdb
POSTGRES_USER: appuser
POSTGRES_PASSWORD: apppassword
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U appuser -d appdb"]
interval: 2s
timeout: 5s
retries: 10
start_period: 5s
backend:
build:
context: ./backend
container_name: app-backend
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
PORT: 3000
CORS_ORIGIN: http://localhost:5173
DB_HOST: db
DB_PORT: 5432
DB_NAME: appdb
DB_USER: appuser
DB_PASSWORD: apppassword
# Optional: if you mount the SAP NW RFC SDK into the container,
# these help node-rfc resolve native libraries.
SAPNWRFC_HOME: ${SAPNWRFC_HOME:-/opt/sap/nwrfcsdk}
LD_LIBRARY_PATH: ${LD_LIBRARY_PATH:-/opt/sap/nwrfcsdk/lib}
SAP_USER: ${SAP_USER:-}
SAP_PASSWORD: ${SAP_PASSWORD:-}
SAP_ASHOST: ${SAP_ASHOST:-}
SAP_SYSNR: ${SAP_SYSNR:-}
SAP_CLIENT: ${SAP_CLIENT:-}
SAP_LANG: ${SAP_LANG:-EN}
volumes:
- ./backend:/app
- /app/node_modules
# Optional: mount host SDK folder into container.
# By default this points to a local placeholder so compose works even when /opt is not mountable.
# Set SAPNWRFC_HOST_PATH and SAPNWRFC_CONTAINER_PATH to real paths when needed.
- ${SAPNWRFC_HOST_PATH}:${SAPNWRFC_CONTAINER_PATH}:ro
# Mount SAP table list file
- ./SAP-TABLE-LIST.txt:/app/SAP-TABLE-LIST.txt:ro
ports:
- "3000:3000"
frontend:
build:
context: ./frontend
container_name: app-frontend
restart: unless-stopped
depends_on:
- backend
environment:
VITE_API_BASE: http://localhost:3000
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5173:5173"
volumes:
pgdata: