mirror of
https://github.com/zoriya/vex.git
synced 2025-12-05 22:56:09 +00:00
50 lines
947 B
YAML
50 lines
947 B
YAML
services:
|
|
api:
|
|
build:
|
|
context: ./api
|
|
dockerfile: Dockerfile.dev
|
|
restart: on-failure
|
|
volumes:
|
|
- ./api:/app
|
|
env_file:
|
|
- ./.env
|
|
ports:
|
|
- 1597:1597
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: postgres:15
|
|
restart: on-failure
|
|
env_file:
|
|
- ./.env
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
- ./sql/create.sql:/docker-entrypoint-initdb.d/init.sql
|
|
command: ["postgres", "-c", "log_statement=all"]
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
web:
|
|
build:
|
|
context: ./web
|
|
dockerfile: Dockerfile.dev
|
|
restart: on-failure
|
|
volumes:
|
|
- ./web:/app
|
|
ports:
|
|
- 5173:5173
|
|
environment:
|
|
- API_URL=http://api:1597
|
|
depends_on:
|
|
- api
|
|
|
|
volumes:
|
|
db:
|