{"id":25753760,"url":"https://github.com/slicequeue/docker-compose-influxdb","last_synced_at":"2026-06-18T10:31:30.575Z","repository":{"id":279342085,"uuid":"938493357","full_name":"slicequeue/docker-compose-influxdb","owner":"slicequeue","description":"InfluxDB 2.0을 Docker Compose를 이용 설치 및 실행 가이드","archived":false,"fork":false,"pushed_at":"2025-02-25T03:48:57.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T04:29:59.284Z","etag":null,"topics":["docker-compose","influxdb2"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slicequeue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-25T03:31:02.000Z","updated_at":"2025-02-25T04:06:54.000Z","dependencies_parsed_at":"2025-02-25T04:40:04.847Z","dependency_job_id":null,"html_url":"https://github.com/slicequeue/docker-compose-influxdb","commit_stats":null,"previous_names":["slicequeue/docker-compose-influxdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slicequeue/docker-compose-influxdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fdocker-compose-influxdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fdocker-compose-influxdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fdocker-compose-influxdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fdocker-compose-influxdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slicequeue","download_url":"https://codeload.github.com/slicequeue/docker-compose-influxdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slicequeue%2Fdocker-compose-influxdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34487069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","influxdb2"],"created_at":"2025-02-26T15:20:08.558Z","updated_at":"2026-06-18T10:31:30.546Z","avatar_url":"https://github.com/slicequeue.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfluxDB \n\n### 개요\n이 문서는 InfluxDB 2.0을 Docker Compose를 이용하여 손쉽게 배포하고 실행하는 방법을 설명합니다.\nDocker의 secrets 기능을 활용하여 보안성을 높였으며, 프로젝트 구조를 명확하게 정리하였습니다.\n\n- 🔗 공식 문서: InfluxDB Docs\n- 🐳 Docker Hub: InfluxDB Docker Image\n\n### 0. 작업할 폴더 생성 및 경로 이동\n\nInfluxdb 도커 설정할 폴더 생성 \n\n```bash\n$ mkdir influxdb\n$ cd influxdb\n```\n\n### 1. docker-compose.yml 작성\n\n도커 파일 위 문서에 나온 내용대로 작성한다\n\n```yaml\n# compose.yaml\nservices:\n  influxdb2:\n    image: influxdb:2\n    ports:\n      - 8086:8086\n    restart: always # 항상 재실행 설정\n    environment:\n      DOCKER_INFLUXDB_INIT_MODE: setup\n      DOCKER_INFLUXDB_INIT_USERNAME_FILE: /run/secrets/influxdb2-admin-username\n      DOCKER_INFLUXDB_INIT_PASSWORD_FILE: /run/secrets/influxdb2-admin-password\n      DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE: /run/secrets/influxdb2-admin-token\n      DOCKER_INFLUXDB_INIT_ORG: \u003c초기ORGANIZATION명\u003e\n      DOCKER_INFLUXDB_INIT_BUCKET: \u003c초기버킷값\u003e\n    secrets:\n      - influxdb2-admin-username\n      - influxdb2-admin-password\n      - influxdb2-admin-token\n    volumes:\n      - type: volume\n        source: influxdb2-data\n        target: /var/lib/influxdb2\n      - type: volume\n        source: influxdb2-config\n        target: /etc/influxdb2\n\nsecrets:\n  influxdb2-admin-username:\n    file: ./env/.env.influxdb2-admin-username\n  influxdb2-admin-password:\n    file: ./env/.env.influxdb2-admin-password\n  influxdb2-admin-token:\n    file: ./env/.env.influxdb2-admin-token\n\nvolumes:\n  influxdb2-data:\n  influxdb2-config:\n\n```\n\n이 내용으로 작성하는데 공식문서와 다른점은 다음과 같다.\n\n- secrets 부분 현재 경로에서 env 폴더로 인증 계정 연결처리\n    - influxdb2-admin-username:\n        - file: ./env/.env.influxdb2-admin-username\n    - influxdb2-admin-password:\n        - file: ./env/.env.influxdb2-admin-password\n    - influxdb2-admin-token:\n        - file: ./env/.env.influxdb2-admin-token\n\n### 2. 디렉터리 구조에 따른 계정 설정\n\n프로젝트 구조는 다음과 같다\n\n```bash\n~/Dockers/influxdb/\n├── docker-compose.yml\n├── env\n│   ├── .env.influxdb2-admin-password\n│   ├── .env.influxdb2-admin-token\n│   └── .env.influxdb2-admin-username\n├── influxdb2-config\n└── influxdb2-data\n\n```\n\n위 설정한 screts 내용을 반영하기 위해 계정 정보를 생성한다\n\n```java\n$ mkdir env\n$ echo \u003c계정아이디\u003e \u003e ./env/.env.influxdb2-admin-username  \n$ echo \u003c계정비밀번호\u003e \u003e ./env/.env.influxdb2-admin-password\n$ echo \u003c계정토큰값\u003e \u003e ./env/.env.influxdb2-admin-token\n\n# Docker는 보안상 Secrets 파일의 권한을 엄격히 체크합니다.\n$ sudo chmod 600 env/.env.influxdb2-admin-*\n```\n\n### 3. docker compose 실행 \u0026 접속\n\n도커 컴포즈 이용하여 실행해본다. 첫 실행이니 만큼 -d 하지 말고 실행해본다\n\n```bash\n$ docker-compose pull\n$ docker-compose up\n```\n\n로그 내용 잘 보고 잘 로그 잘 찍히고 잘 실행 되면 [http://localhost:8086](http://localhost:8056) 접속 후 위 계정 정보에 따라 접속 잘 되면 정상적으로 잘 적용이 된 것이다!\n\n\n![image](https://github.com/user-attachments/assets/c6eb25dc-ce9b-4d45-bafe-d0654a6eb9da)\n![image](https://github.com/user-attachments/assets/ac407a5c-9acb-49c7-ab19-8c6ea338793f)\n\n\n\n### 기타\n\n설정 중 잘 안되었을 경우 다음 명령어로 기존 볼륨 설정과 시크릿 설정등 모두 초기화하는 설정으로 컨테이너 중단을 해야 꼬임 없이 초기 값 잘 지정하여 \n\n1. **컨테이너를 완전히 중지 및 삭제**\n\n```bash\n$ docker compose down --volumes --remove-orphans\n```\n\n2. **Docker Compose가 기존의 캐시를 버리고 다시 읽도록 빌드**\n\n```bash\n$ docker compose up --force-recreate\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslicequeue%2Fdocker-compose-influxdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslicequeue%2Fdocker-compose-influxdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslicequeue%2Fdocker-compose-influxdb/lists"}