• File: docker-compose.yml
  • Full Path: /var/www/html/back/docker-compose.yml
  • File size: 1022 B
  • MIME-type: text/plain
  • Charset: utf-8
services:
  app:
    build:
      context: .
      dockerfile: ./Dockerfile
      args:
        USER_ID: ${USER_ID:-1000}
        GROUP_ID: ${GROUP_ID:-1000}
    ports:
      - "8095:80"
    dns:
      - 1.1.1.1
      - 1.0.0.1
    depends_on:
      - postgres
      - redis
    working_dir: /var/www/html
    volumes:
      - .:/var/www/html
      - ./docker/php:/usr/local/etc/php/conf.d
    networks:
      - app-network

  postgres:
    image: postgres:14-alpine
    restart: always
    environment:
      - POSTGRES_DB=laravel
      - POSTGRES_USER=sail
      - POSTGRES_PASSWORD=secret
    volumes:
      - postgres-data:/var/lib/postgresql/data
    networks:
      - app-network

  redis:
    image: redis:alpine
    restart: always
    networks:
      - app-network

  nginx:
    image: nginx:alpine
    ports:
      - "80:80"
    depends_on:
      - app
    volumes:
      - ./docker/nginx:/etc/nginx/conf.d
    networks:
      - app-network

networks:
  app-network:
    driver: bridge

volumes:
  postgres-data: