-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
58 lines (52 loc) · 1.36 KB
/
docker-compose.yml
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
version: "3"
services:
db:
image: postgres:12
container_name: catalogage-db
ports:
- "6432:5432"
environment:
- POSTGRES_DB=catalogage
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
volumes:
- pgdata:/var/lib/postgresql/data/
client:
build:
context: .
dockerfile: ./docker/client.Dockerfile
container_name: catalogage-client
ports:
- "3000:3000"
environment:
VITE_API_BROWSER_URL: "http://localhost:3579"
VITE_API_SSR_URL: "http://server:3579"
volumes:
- "./client/src:/app/client/src"
restart: always
server:
build:
context: .
dockerfile: ./docker/server.Dockerfile
image: catalogage-server
container_name: catalogage-server
ports:
- "3579:3579"
environment:
APP_HOST: "0.0.0.0"
APP_DATABASE_URL: "postgresql+asyncpg://user:pass@db:5432/catalogage"
restart: always
migrate:
image: catalogage-server
profiles: ["cli"]
command: ./tools/wait-for-it.sh db:5432 -- make migrate
environment:
APP_DATABASE_URL: "postgresql+asyncpg://user:pass@db:5432/catalogage"
initdata:
image: catalogage-server
profiles: ["cli"]
command: ./tools/wait-for-it.sh db:5432 -- make initdata
environment:
APP_DATABASE_URL: "postgresql+asyncpg://user:pass@db:5432/catalogage"
volumes:
pgdata: