aboutsummaryrefslogblamecommitdiffstats
path: root/docker-compose.yaml
blob: b1bb081b621447a7871f341a17103a0e86db9313 (plain) (tree)
1
2
3
4
5
6
7
8


            



                 
                   



                 

                                         
                             

                


                             
                 


                                       
                             









                                                                    
                             
         
            










                                          
version: "3"
services:
  server:
    image: spring
    build:
      context: .
    ports:
      - "9080:8443"
    networks:
      - springnet
    cap_drop:
      - ALL
    environment:
      - DOCKER_DEPLOYMENT_TYPE=deployment
    # restart: unless-stopped
    depends_on:
      - postgres
  postgres:
    image: postgres:14-alpine
    networks:
      - springnet
    volumes:
      - db-data:/var/lib/postgresql/14/
    ports:
      - "127.0.0.1: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
    # restart: unless-stopped
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