Install OpenResty Edge Log Server container
1. Preparation
The following documents/information need to be prepared before installation:
- Configuration package:
openresty-edge-VERSION.tar.gz
, download from Download Center. - Your Edge Admin’s IP, corresponding to
ADMIN_HOST
below. - Your DB’s IP, port and password, corresponding to
DB_HOST
,DB_PORT
andDB_PASSWORD
below. - Image Address, corresponding to
DOCKER_IMAGE
below. - Registry username and password:
REGISTRY_USERNAME
andREGISTRY_PASSWORD
2. Download Image
- Login Registry
sudo docker login --username=REGISTRY_USERNAME registry.openresty.com
# enter password: REGISTRY_PASSWORD
- Download Image
docker pull DOCKER_IMAGE
# example
docker pull registry.openresty.com/edge/ubuntu/20.04/openresty-edge-log-server:22.6.1
3. Run Container
Create a new folder to be mounted in the container:
custom/
Copy
openresty-edge-VERSION.tar.gz
tocustom/
Generate the configuration file for Edge Log Server:
custom/config.ini
Please replace DB_HOST
, DB_PORT
, DB_PASSWORD
and ADMIN_HOST
with their actual contents.
#
# NOTICE: please feel free to edit these configurations if necessary.
#
# Both [postgresql] section and [admin] section need to be configured below.
#
[postgresql]
# the host to connect to, default:
host = "DB_HOST"
# the port to connect to, default:
port = "DB_PORT"
# password for authentication, default:
password = 'DB_PASSWORD'
# enable ssl, default:
ssl = false
# abort the connection if the server does not support SSL connections, default:
ssl_required = false
# NOTICE: we hard code the database: or_edge_log_server and the user: or_edge_log_server
# please contact us when you want to change them.
[admin]
# admin host, default:
host = "ADMIN_HOST"
- Run Container
Suppose the absolute path to
custom/
is/root/custom/
.
docker run -d -p 12346:12346 --name openresty-edge-log-server -v /root/custom/:/usr/local/oredge-log-server/custom/ DOCKER_IMAGE
# example:
docker run -d -p 12346:12346 --name openresty-edge-log-server -v /root/custom/:/usr/local/oredge-log-server/custom/ registry.openresty.com/edge/ubuntu/20.04/openresty-edge-log-server:22.6.1
- If an error occurs, the container can be stopped and deleted using the following command:
docker stop openresty-edge-log-server
docker rm openresty-edge-log-server
Now, the installation of the OpenResty Edge Log Server container is complete.