🩸 삽질의 추억
-
[Docker, MongoDB] 도커에 올렸더니 Authentication failed🩸 삽질의 추억 2024. 4. 14. 14:51
상황: docker compose up(혹은 run) 후, swagger 까지는 잘 들어가지는데 execute 를 하면 Authenication failed 가 뜨는 경우이다. + 로컬에선 문제 없었음 해결 // docker-compose.yml version: '3.8' services: mongodb: (중략) environment: - MONGO_INITDB_DATABASE=chatDB - MONGO_INITDB_ROOT_USERNAME=root - MONGO_INITDB_ROOT_PASSWORD=root app: (중략) environment: - SPRING_DATA_MONGODB_URI=mongodb://root:root@mongodb:27017/chatDB?authSource=admin //..
-
[Docker+원격서버] 플랫폼 호환- 옵션 부여/compose.yml 에 작성🩸 삽질의 추억 2024. 4. 14. 09:50
문제 상황 The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested 이미지를 빌드할때 생성된 빌드 플랫폼이 호환되지 않는디는 뜻이다. 해결 방법 1. docker build 시에 --platform linux/amd64 옵션 값을 부여한다 2. 매번 부여하기 귀찮다! docker-compose.yml 에 설정해서 자동화하고 싶다 services: app: image: seoyoungyoon/eum-chat:latest platform: linux/amd64 ports: - "외부 포트:내부 포트"
-
[CORS, Spring Boot] WebMvcConfigurer 설정 후에도 access-control-allow-headers 에러🩸 삽질의 추억 2024. 4. 14. 04:37
Access to fetch at ‘https://내가올린원격서버주소’ from origin ‘http://localhost:3000’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled. 문제 상황: webmvcconfig 를 했는데도👿👿💢이러한 에러가 계속 뜸 해결방법 무식한 방법- 와일드 카드 설정 .allowedHeaders("*") 안무식한 방..