docker-compose 기반 로컬sentry 서비스 구축

3812 단어
환경 요구 사항:
  • centos 7
  • Docker 17.05.0+
  • Compose 1.19.0+
  • RAM 2400MB

  • docker-compose 설치
    `` $ curl -L https://get.daocloud.io/docker/compose/releases/download/1.24.1/docker-compose- uname -s - uname -m` >/usr/local/bin/docker-compose
    $ chmod +x/usr/local/bin/docker-compose
    or
    $ yum install python-pip
    $ pip install docker-compose
    or $ curl -L --fail https://github.com/docker/compose/releases/download/1.24.1/run.sh >/usr/local/bin/docker-compose $ sudo chmod +x/usr/local/bin/docker-compose ```
    1.git는 현재/data/sentry로 가정하고 이 디렉터리에 들어갑니다.git clone https://github.com/getsentry/onpremise.git , onpremise。
    2. 사전 설치 구성cd onpremise/sentry cp config.example.yml config.yml smtp # mail.backend: 'smtp' # Use dummy if you want to disable email entirely mail.host: 'smtp.163.com' mail.port: 25 mail.username: '[email protected]' mail.password: 'xxxx' mail.use-tls: false #The email address to send on behalf of mail.from: '[email protected]'
    3. 직접 실행합니다./install.sh , docker-compose : docker-compose up -d docker-compose ps : Name Command State Ports --------------------------------------------------------------------------------------- onpremise_base_1 /entrypoint.sh run web Up 9000/tcp onpremise_cron_1 /entrypoint.sh run cron Up 9000/tcp onpremise_memcached_1 docker-entrypoint.sh memcached Up 11211/tcp onpremise_postgres_1 docker-entrypoint.sh postgres Up 5432/tcp onpremise_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp onpremise_smtp_1 entrypoint.sh tini -- exim ... Up 25/tcp onpremise_web_1 /entrypoint.sh run web Up 0.0.0.0:9000->9000/tcp onpremise_worker_1 /entrypoint.sh run worker Up 9000/tcp {ip}:9000, 。
    4.기타
                ,      docker-compose.yml     web     ,       8888       :
    
    web:
    extends: base
    links:
    - redis
    - postgres
    - memcached
    - smtp
    ports:
    - '8888:9000'
                 systemd   ,docker-compose          :
    docker-compose up #        ,          ,      -d        
    docker-compose stop #     
    docker-compose start #     ,    up          
    
              docker   :
    
      config.yal
      
      sentry.conf.py,    smtp  :
    
    SENTRY_OPTIONS['mail.backend'] = 'smtp'
    SENTRY_OPTIONS['mail.host'] = 'smtp.***.com'
    SENTRY_OPTIONS['mail.password'] = '*******'
    SENTRY_OPTIONS['mail.username'] = 'sentry@**.com'
    SENTRY_OPTIONS['mail.port'] = 25
    SENTRY_OPTIONS['mail.use-tls'] = False
    
      
    
    docker-compose down(      )
    docker-compose build (      )
    docker-compose up -d (  )
    
     
    
       ok 
      :centos     firewalld,    firewalld docker     ,      firewalld  :
    firewall-cmd --permanent --add-rich-rule="rule family="ipv4" port protocol="tcp" port="9000" accept"
    firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="     ip" accept"
    firewall-cmd --permanent --zone=trusted --change-interface=docker0
    firewall-cmd --permanent --zone=trusted --add-port=9000/tcp
    firewall-cmd --add-port=9000/tcp --permanent
    
    Updating Sentry
    Updating Sentry using Compose is relatively simple. Just use the following steps to update. Make sure that you have the latest version set in your Dockerfile. Or use the latest version of this repository.
    
     
    
    Use the following steps after updating this repository or your Dockerfile:
    
     
    
    docker-compose build --pull # Build the services again after updating, and make sure we're up to date on patch version
    docker-compose run --rm web upgrade # Run new migrations
    docker-compose up -d # Recreate the services

    좋은 웹페이지 즐겨찾기