Files
tasknote/docker-compose.yml
T

66 lines
1.6 KiB
YAML
Raw Normal View History

2024-08-25 14:47:10 -03:00
---
services:
client:
2024-09-12 21:31:41 -03:00
container_name: client
2024-08-25 14:47:10 -03:00
image: node:20.17-bullseye-slim
ports:
- "5000:5000"
entrypoint: sh -c "npm i --no-update-notifier && npm start"
user: root
volumes:
2024-09-12 21:31:41 -03:00
- "./client:/app"
2024-08-25 14:47:10 -03:00
working_dir: /app
healthcheck:
2024-09-12 21:31:41 -03:00
test: timeout 10s bash -c 'true > /dev/tcp/127.0.0.1/5000'
interval: 1m30s
timeout: 15s
retries: 3
start_period: 10s
2024-08-25 14:47:10 -03:00
2024-09-24 12:07:37 -03:00
server:
container_name: server
depends_on:
2024-09-24 12:07:37 -03:00
db:
condition: service_started
environment:
POSTGRES_DB: tasknote
2024-09-24 12:07:37 -03:00
POSTGRES_HOST: db
POSTGRES_USER: tasknoteuser
POSTGRES_PASSWORD: default
2024-09-24 12:07:37 -03:00
POSTGRES_PORT: 5435
ports:
- "8585:8585"
- "5005:5005"
image: maven:3.9.9-eclipse-temurin-17
entrypoint: './mvnw -ntp spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:5005" -Dmaven.plugin.validation=VERBOSE'
working_dir: /app
volumes:
2024-09-27 09:03:48 -03:00
- "./server:/app"
healthcheck:
test: curl -f http://localhost:8585/actuator/health | grep '"status":"UP"'
interval: 1m30s
2024-09-12 21:31:41 -03:00
timeout: 15s
retries: 3
start_period: 10s
2024-09-24 12:07:37 -03:00
db:
container_name: db
image: postgres:15.8-bookworm
environment:
POSTGRES_DB: tasknote
POSTGRES_USER: tasknoteuser
POSTGRES_PASSWORD: default
2024-09-24 12:07:37 -03:00
POSTGRES_PORT: 5435
2024-09-12 21:31:41 -03:00
PGDATA: /tmp
volumes:
2024-09-12 21:31:41 -03:00
- "./data:/tmp"
ports:
2024-09-24 12:07:37 -03:00
- "5435:5432"
healthcheck:
test: psql -q -U $${POSTGRES_USER} -d $${POSTGRES_DB} -c 'SELECT 1'
interval: 1m30s
timeout: 15s
retries: 3
2024-09-12 21:31:41 -03:00
start_period: 10s