eletrotupi / tcc/ docker-compose.yml02a7abe0f5af9cd206353ebb7cd528461b95aeb7
671 B | 36 lines Raw
1
services:
2
  db:
3
    image: postgres:17-alpine
4
    shm_size: 1g
5
    user: postgres
6
    restart: always
7
    healthcheck:
8
      test: "pg_isready -U user --dbname=postgres"
9
      interval: 10s
10
      timeout: 5s
11
      retries: 5
12
    ports:
13
      - 5430:5432
14
    environment:
15
      POSTGRES_USER: user
16
      POSTGRES_DB: orbit_dev
17
      POSTGRES_PASSWORD: password
18
    volumes:
19
      - db_data:/var/lib/postgresql/data
20

21
  api:
22
    build: ./api
23
    volumes:
24
      - ./api:/app
25
      - /app/node_modules
26
    ports:
27
      - 3000:3000
28
    env_file:
29
      - api/.env.development
30
    depends_on:
31
      db:
32
        condition: service_healthy
33
    restart: always
34

35
volumes:
36
  db_data: