-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
53 lines (53 loc) · 1.06 KB
/
compose.yml
File metadata and controls
53 lines (53 loc) · 1.06 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
version: '3'
services:
db:
image: postgres:15
ports:
- '5432:5432'
environment:
- POSTGRES_USER=pguser
- POSTGRES_PASSWORD=pgpass
- POSTGRES_DB=liblifedb
volumes:
- liblifedb:/var/lib/postgresql/data
api:
build:
context: ./api
ports:
- '8999:8999'
depends_on:
- db
environment:
- DB_HOST=db
volumes:
- ./api:/api
command: sh -c "sed -i 's/localhost/db/g' alembic.ini && alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8999 --reload"
frontend:
build:
context: ./frontend
ports:
- '3999:3999'
depends_on:
- api
environment:
- PORT=3999
- API_URL=http://api:8999
- HOST=0.0.0.0
command: npm start
volumes:
- ./frontend:/frontend
- /frontend/node_modules
- ./nginx/html:/var/www/html
nginx:
build:
context: ./nginx
ports:
- '80:80'
- '81:81'
depends_on:
- api
- frontend
volumes:
- ./nginx/html:/var/www/html
volumes:
liblifedb: