version: '3'

services:
  keycloak:
    image: quay.io/keycloak/keycloak:latest
    restart: always
    container_name: keycloak
    environment:
      - KEYCLOAK_ADMIN=admin
      - KEYCLOAK_ADMIN_PASSWORD=admin
      - KC_DB=postgres
      - KC_DB_URL=jdbc:postgresql://postgres/keycloak
      - KC_DB_USERNAME=postgres
      - KC_DB_PASSWORD=postgres
      - KC_HOSTNAME=localhost
      - KC_DB_SCHEMA=public
    ports:
      - "8080:8080"
    command: start-dev
    depends_on:
      - postgres
    networks:
      - [network]

networks:
  [network]:
    external: true
반응형

'Docker > docker-compose' 카테고리의 다른 글

docker-compose로 postgresql 올리기  (0) 2023.12.06
docker-compose로 Swagger 올리기  (0) 2023.09.25
version: '3'

services:
  postgres:
    image: postgres:latest
    restart: always
    container_name: postgres
    ports:
      - "5432:5432"
    environment:
      POSTGRES_DB: postgres
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    volumes:
      - ./volume/postgresql/:/var/lib/postgresql/data
      - ./sql:/docker-entrypoint-initdb.d
    networks:
      - [network]
      
networks:
  [network]:
    external: true
반응형

'Docker > docker-compose' 카테고리의 다른 글

docker-compose로 keycloak 올리기  (0) 2023.12.06
docker-compose로 Swagger 올리기  (0) 2023.09.25

개발 서버에 도커 컨테이너로 swagger를 말아 올려 간단히 api 문서만 볼 수 있게 만들기로 하여 공식문서등을 참고하여 해결했다. 여러분들은 저와같은 실수를 하지 말라며 실제 실행 완료한 docker-compose 파일문을 남긴다.

version: '3.3'

services:
  swagger-ui:
    image: swaggerapi/swagger-ui:latest
    restart: always	
    container_name: swagger-ui
    environment:
      URLS: "[{url: 'doc/auth.json', name: 'AuthServer'}]"
    volumes:
      - /data/volume/swagger/:/usr/share/nginx/html/doc
    ports:
      - 9999:8080
    networks:
      - sample

networks:
  sample:
    external: true

 

 

 

 

https://stackoverflow.com/questions/56541964/providing-local-file-to-swagger-ui-through-docker

 

Providing local file to swagger ui through Docker

I have read on https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/ that it is possible to host a local file (swagger.json) on swagger ui through docker by writing docker run -...

stackoverflow.com

 

https://articles.wesionary.team/swagger-ui-on-docker-for-testing-rest-apis-5b3d5fcdee7

 

Swagger UI on docker for testing REST APIs

Testing REST APIs in software development is an important part of any development process. As so, it’s a very important role of the QA…

articles.wesionary.team

 

 

반응형

'Docker > docker-compose' 카테고리의 다른 글

docker-compose로 keycloak 올리기  (0) 2023.12.06
docker-compose로 postgresql 올리기  (0) 2023.12.06

+ Recent posts