aboutsummaryrefslogblamecommitdiffstats
path: root/docker-compose.yaml
blob: f92cc94a1094ac7837bcf052de8d47ff8fdb636e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12


            








                   


                             
                 













                                                                    
         
            










                                          
version: "3"
services:
  server:
    image: spring
    build:
      context: .
    ports:
      - "9080:8080"
    networks:
      - springnet
    cap_drop:
      - ALL
  postgres:
    image: postgres:14-alpine
    networks:
      - springnet
    volumes:
      - db-data:/var/lib/postgresql/14/
    ports:
      - "5432:5432"
    environment:
      - POSTGRES_PASSWORD_FILE=/run/secrets/pg_pass_secret
      - POSTGRES_USER_FILE=/run/secrets/pg_user_secret
      - POSTGRES_INITDB_ARGS_FILE=/run/secrets/pg_initdb_args_secret
      - POSTGRES_DB_FILE=/run/secrets/pg_db_secret
    secrets:
      - pg_pass_secret
      - pg_user_secret
      - pg_initdb_args_secret
      - pg_db_secret
networks:
  springnet:
volumes:
  db-data:
secrets:
  pg_pass_secret:
    file: ./postgres/pg_pass_secret
  pg_user_secret:
    file: ./postgres/pg_user_secret
  pg_initdb_args_secret:
    file: ./postgres/pg_initdb_args_secret
  pg_db_secret:
    file: ./postgres/pg_db_secret