version: '3.8' services: web: container_name: web.vet restart: on-failure environment: DATABASE_URL: "postgres://postgres:administrador@db/petshop" working_dir: /var/www/html volumes: - ./:/var/www/html build: . stdin_open: true tty: true ports: - "8080:8080" privileged: true depends_on: - db links: - db networks: - dockernet deploy: resources: limits: cpus: "0.90" memory: 2000M reservations: cpus: "0.25" memory: 1000M db: container_name: postgres.vet healthcheck: test: "pg_isready -q -U postgres" restart: always volumes: - ./sql:/docker-entrypoint-initdb.d/ environment: POSTGRES_USER: "postgres" POSTGRES_DB: "petshop" POSTGRES_PASSWORD: "administrador" image: postgres:13-alpine networks: - dockernet ports: - "5433:5432" # command: -p 5433 # expose: # - 5432 networks: dockernet: driver: bridge name: dockernet