docker-compose

mail@pastecode.io avatar
unknown
java
a year ago
819 B
4
Indexable
Never
version: '3.8'

services:

  db:
    image: postgres:14.7-alpine
    volumes:
      - /var/lib/postgresql/data/
    container_name: ShareItDb
    ports:
      - "6541:5432"
    environment:
      - POSTGRES_DB=shareit
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=root
      - TZ=Europe/Moscow

  server:
    build: ./server
    container_name: ShareItServer
    ports:
      - "9090:9090"
    depends_on:
      - db
    environment:
      - SPRING_DATASOURCE_URL=jdbc:postgresql://ShareItDb:5432/shareit
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=root
      - TZ=Europe/Moscow

  gateway:
    build: ./gateway
    container_name: ShareItGateway
    ports:
      - "8080:8080"
    depends_on:
      - server
    environment:
      - SHAREIT_SERVER_URL=http://ShareItServer:9090
      - TZ=Europe/Moscow