Untitled

🧩 Syntax:
version: '3'
services:
  timescaledb:
    image: timescale/timescaledb:latest-pg12
    environment:
      - POSTGRES_PASSWORD=sydlambert
    ports:
      - "5432:5432"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro



version: '3'

services:
  web:
    build: ./app
    command: ['/bin/sh', '-c', 'sh ./entrypoint.sh && sh ./start.sh']
    # command: ['/bin/sh', '-c', 'sh ./create_migration.sh && sh ./start.sh'] # run this to create migrations file if models.py has been changed
    ports:
      - 8081:8080
    # env_file:
    #   - ./env/local.env
    environment:
      - SWAI_TOKEN=$SWAI_TOKEN
      - DB_HOST=host.docker.internal
    volumes:
      - ./app/:/usr/src/app/
    depends_on:
      - postgres
  postgres:
    image: postgres:13
    environment:
      - POSTGRES_DB=infra
      - DB_HOST=host.docker.internal
      - POSTGRES_USER=ucplace
      - POSTGRES_PASSWORD=sydlambert
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
    ports:
      - 5433:5432