IT/도커(Docker)

도커(Docker)로 GPS Tracking 서버 traccar 설치하기

MirDaTe 2022. 3. 22. 08:28
728x90

참고 사이트 - https://hub.docker.com/r/traccar/traccar

 

Docker Hub

 

hub.docker.com

1. Create work directories:
   mkdir -p /var/docker/traccar/logs


2. Get default traccar.xml:
   docker run \

   --rm \

   --entrypoint cat \

   traccar/traccar:latest \ /opt/traccar/conf/traccar.xml > /var/docker/traccar/traccar.xml


3. Edit traccar.xml: https://www.traccar.org/configuration-file/

4. Create container:

version: '3.3'
services:
    traccar:
        restart: always
        container_name: traccar
        ports:
            - '80:8082'
            - '5000-5150:5000-5150'
            - '5000-5150:5000-5150/udp'
        volumes:
            - '/var/docker/traccar/logs:/opt/traccar/logs:rw'
            - '/var/docker/traccar/traccar.xml:/opt/traccar/conf/traccar.xml:ro'
        image: 'traccar/traccar:latest'

 

스마트폰 앱 설치해서 연동

관리자용 앱 : https://play.google.com/store/apps/details?id=org.traccar.manager&hl=ko&gl=US 

 

Traccar Manager - Google Play 앱

Traccar 서버 콘솔

play.google.com

클라이언트용 앱 : https://play.google.com/store/apps/details?id=org.traccar.client&hl=ko&gl=US 

 

Traccar Client - Google Play 앱

소프트웨어의 GPS 추적기

play.google.com

- 앱 설치 후 도커로 설치한 웹주소 입력, 임의의 이름 입력, 장치식별자의 숫자를 관리자용 앱 혹은 웹에서 등록 (중요!)

- 위치 정확도, 위치수집 주기 등의 세부사항 설정 가능

** 핸드폰 외 적용가능한 디바이스 목록은 아래 주소 참고해주세요~

https://www.traccar.org/devices/

 

Supported Devices - Traccar

Supported Devices List of GPS tracking devices and applications supported by Traccar server. Note that even if your model is missing from the list, there is a very good chance that it's still supported in Traccar. If you own a device made in China, please

www.traccar.org

--------------------------------------------------------- 아래는 개인적으로 정리한 설치방법입니다.

 

<docker-compose.yml 파일>

 

version: '3.3'
services:
    traccar:
        restart: always
        container_name: traccar
        ports:
            - '8082:8082'
            - '5000-5150:5000-5150'
            - '5000-5150:5000-5150/udp'
        volumes:
            - './logs:/opt/traccar/logs:rw'
            - './traccar.xml:/opt/traccar/conf/traccar.xml:ro'
        image: 'traccar/traccar:latest'

 

<첨부된 traccar.xml 파일 업로드 및 적용>

traccar.xml
0.00MB