-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
55 lines (51 loc) · 1.5 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
version: '3'
services:
postgres:
image: postgres:13
container_name: my-postgres
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: my-server
ports:
- '3000:3000'
depends_on:
- postgres
environment:
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_DB: mydatabase
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
DATABASE_URL: 'postgresql://myuser:mypassword@postgres:5432/bank-db?schema=SCHEMA'
ACCESS_TOKEN_SECRET: accessSecret
ACCESS_TOKEN_TIME: 3600000
REFRESH_TOKEN_SECRET: refreshSecret
REFRESH_TOKEN_TIME: 7200000
MIN_CREDIT_SCORE: 1
command: ['/bin/sh', 'init.sh'] # Set the command to run the init.sh script
client:
build:
context: ./client
dockerfile: Dockerfile
container_name: my-client
ports:
- '3001:3001'
depends_on:
- postgres
- server
environment:
SERVER_HOST: my-server
SERVER_PORT: 3000
VITE_API_BASE_URL: http://my-server:3000
volumes:
postgres_data: