Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.4 kB
0
Indexable
Never
version: "3.7"

services:
  e_nginx:
    container_name: esustav_nginx
    image: nginx:1.17
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
    ports:
      - 8700:80
    depends_on:
      - e_frontend
      - e_backend

  e_backend:
    build: ./backend
    container_name: esustav_api
    restart: always
    depends_on:
      - esustav_db

  e_frontend:
    container_name: esustav_fe
    build:
      context: frontend
      dockerfile: Dockerfile
    volumes:
      - "./frontend:/app"

  esustav_db:
    container_name: esustav_db
    image: postgres:latest
    restart: always
    environment:
      POSTGRES_DB: esustav
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: vipIT2023
      PGDATA: /var/lib/postgresql/dat
    healthcheck:
      test: ["CMD-SHELL", "sh -c 'pg_isready -U admin -d esustav'"]
      interval: 15s
      timeout: 3s
      retries: 5
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

  pgadmin:
    container_name: esustav_pgadmin
    image: dpage/pgadmin4
    restart: always
    ports:
      - 5050:80
    environment:
      PGADMIN_DEFAULT_EMAIL: esustav@gmail.com
      PGADMIN_DEFAULT_PASSWORD: esustavADMIN2023
    volumes:
      - ./pgadmin-data:/var/lib/pgadmin
    depends_on:
      - esustav_db

networks:
  default: