System Requirements
- CentOS 7
- Docker 17.05.0+
- Compose 1.19.0+
- RAM 2400MB
Installing Docker Compose
# Option 1: Download binary
$ 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
# Option 2: Using pip
$ yum install python-pip
$ pip install docker-compose
# Option 3: Alternative download method
$ 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. Clone the Repository
$ git clone https://github.com/getsentry/onpremise.git
$ cd onpremise # The default directory name is "onpremise"
2. Pre‑Installation Configuraton
$ cp config.example.yml config.yml
Edit the SMTP settings in config.yml:
# mail.backend: 'smtp' # Use 'dummy' to disable email completely
mail.host: 'smtp.163.com'
mail.port: 25
mail.username: 'xxxx@163.com'
mail.password: 'xxxx'
mail.use-tls: false
mail.from: 'xxxx@163.com'
3. Run the Install Script
$ ./install.sh
After installation, start all containers with:
$ docker-compose up -d
Verify the running containers with docker-compose ps. You should see a list similar to:
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 ... Up 11211/tcp
onpremise_postgres_1 docker-entrypoint.sh ... Up 5432/tcp
onpremise_redis_1 docker-entrypoint.sh ... Up 6379/tcp
onpremise_smtp_1 entrypoint.sh tini -- ... 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
Open you're browser at http://{server-ip}:9000 and log in with the admin credentials you provided during installation.
4. Additional Notes
-
Changing the host port: To use a different host port, edit the
webservice indocker-compose.yml. For example, to expose port 8888: ``` web: extends: base links: - redis - postgres - memcached - smtp ports: - '8888:9000' -
Managing with systemd: You can integrate the service with systemd using standard
docker-composecommands: ``` docker-compose up # Create and start containers docker-compose stop # Stop services docker-compose start # Start services after they have been created and stopped -
Applying configuration changes to running containers: After modifying
config.ymlorsentry.conf.py, rebuild and restart the stack: ``` docker-compose down # Stop and remove containers docker-compose build # Rebuild images docker-compose up -d # Restart services -
Firewall configuration (CentOS / firwealld): Do not disable firewalld. Instead, allow necessary ports and interfaces: ``` 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="<allowed_client_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 </allowed_client_ip>
-
Updating Sentry: Update your Dockerfile or this repository to the latest version, then run: ``` docker-compose build --pull docker-compose run --rm web upgrade docker-compose up -d