-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
38 lines (38 loc) · 1000 Bytes
/
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
services:
client:
build: ./client
container_name: teo-client
ports:
- "5173:5173"
volumes:
- ./client:/usr/src/app
- /usr/src/app/node_modules
# mounts the schema for codegen
- ./api/graphql:/usr/src/api/graphql
api:
build: ./api
container_name: teo-api
entrypoint: ["dockerize", "-wait", "tcp://postgres:5432", "-timeout", "30s", "sh", "-c", "yarn migrate && yarn dev"]
networks:
- infra
ports:
- "4000:4000"
volumes:
- ./api:/usr/src/app
- /usr/src/app/drizzle
- /usr/src/app/node_modules
depends_on:
- postgres
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
postgres:
container_name: teo-postgres
image: postgres:latest
networks:
- infra
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
networks:
infra: