서버 프로그래밍(274)
-
CSS로 이미지 파일에 필터 효과 처리
흰색 마스킹 이미지 처리 html { background: red; } p { float: left; max-width: 50%; text-align: center; } img { display: block; max-width: 100%; } .filter { -webkit-filter: brightness(0) invert(1); filter: brightness(0) invert(1); } Original: Filter: https://stackoverflow.com/questions/24224112/css-filter-make-color-image-with-transparency-white CSS filter: make color image with transparency white I have a..
2022.08.24 -
Jest 스냅샷 테스트 관련 오류
로컬에서는 문제없이 테스트가 실행되지만, CI/CD 파이프라인에서는 다음과 같은 오류가 발생한다. New snapshot was not written. The update flag must be explicitly passed to write a new snapshot. This is likely because this test is run in a continuous integration (CI) environment in which snapshots are not written by default. To resolve this, we will need to update our snapshot artifacts. You can run Jest with a flag that will tell it to ..
2022.08.16 -
Self-managed GitLab의 Container Registry 정리 방법
도커라이징된 백엔드/프론트엔드 Docker 이미지를 Container Registry를 이용하여 Deploy 하도록 시스템을 구성해놓았는데, GitLab이 설치된 EC2 인스턴스의 용량이 계속 늘어나는 문제가 발생하였다. Settings/Pakages & Registries에서 클린업을 활성화하면 될것 같았는데, 뭔가 원하는대로 되지 않는다. 그래서 좀더 찾아보니, "Garbage Collect"가 존재한단다. 헐 Garbage Collection Running Garbage Collection will delete all image layers which aren’t linked to a tag. This will result in the removal of images that got untagged..
2022.08.11 -
Python Flask 서버 콘솔 메시지 숨기기
ERROR만 출력되도록 다음과 같이 레벨을 지정해주면 된다. import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) http://daplus.net/python-flask-%EC%84%9C%EB%B2%84%EC%97%90%EC%84%9C-%EC%BD%98%EC%86%94-%EB%A9%94%EC%8B%9C%EC%A7%80-%EB%B9%84%ED%99%9C%EC%84%B1%ED%99%94/ [python] Flask 서버에서 콘솔 메시지 비활성화 - 리뷰나라 독립 실행 형 모드에서 실행중인 Flask 서버가 있습니다 (사용 app.run()). 하지만 콘솔에 메시지가 표시되는 것을 원하지 않습니다. 127.0.0.1 - -..
2022.08.01 -
React Native iOS App 빌드 스크립트
React Native 프로젝트에서 Android App 빌드는 어렵지 않은데, iOS App 빌드는 상대적으로 복잡하다. 물론 fastlane을 이용하면 빌드 뿐만 아니라 배포도 수월하지만, fastlane의 도움 없이 console에서 빌드하는 스크립트를 작성해서 GitLab CI/CD 파이프라인에 적용하여 보았다. https://www.reactnative.guide/11-devops/11.2-ios-build-setup.html iOS Build setup | React Made Native Easy EditiOS build scripts/setup iOS builds via command line are much more complex as compared to Android. Note: Bui..
2022.07.20 -
AWS S3, CloudFront를 이용한 동영상 스트리밍 서비스 (HLS)
다음 레퍼런스를 참고하면 어렵지 않게 동영상 스트리밍 서비스를 구축할 수 있으나, 수시로 바뀌는 AWS 콘솔 레이아웃 때문에 매치하면서 세팅하는 것이 번거롭기는 하다. http://lab.naminsik.com/3960 lab.naminsik lab.naminsik - 개발자 남인식 Lab. lab.naminsik.com 크롬에서 계속 CORS 에러가 떠서 설정을 이리저리 바꿔보다가 다음과 같이 CloudFront behavior를 수정한 다음에야 크롬에서도 정상 동작 완료 아래는 그저 참고만 할 만한 자료 https://sichan-dev.tistory.com/8 S3와 CloudFront로 동영상 서비스 제공하기 1. 구조 프로젝트 요구사항으로 동영상 관리, 재생 서비스가 있었다. 앱으로 등록되는 상..
2022.07.13