mirror of
https://repository.entgra.net/community/entgra-emqx-docker.git
synced 2025-09-16 23:42:18 +00:00
Merge pull request 'Add configuration and data files to the container.' (#1) from pasindu/entgra-emqx-docker:switchgear-aws into master
Reviewed-on: https://repository.entgra.net/community/entgra-emqx-docker/pulls/1
This commit is contained in:
commit
982b118bde
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Ignore everything in this directory
|
||||||
|
target
|
||||||
|
.classpath
|
||||||
|
.settings
|
||||||
|
.project
|
||||||
|
*.iml
|
||||||
|
*.iws
|
||||||
|
*.ipr
|
||||||
|
.idea
|
||||||
|
*.ids
|
||||||
|
.editorconfig
|
||||||
|
.gradle
|
||||||
|
|
||||||
|
# Mac crap
|
||||||
|
.DS_Store
|
||||||
28
Dockerfile
28
Dockerfile
@ -1,8 +1,34 @@
|
|||||||
|
# Copyright (c) 2018 - 2024, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||||
|
# Version 2.0 (the "License"); you may not use this file except
|
||||||
|
# in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
FROM emqx/emqx:4.4.11
|
FROM emqx/emqx:4.4.11
|
||||||
|
|
||||||
|
ARG STATIC_CONFIG_PATH=/opt/emqx/lib/emqx_dashboard-4.4.10/priv/www/static/
|
||||||
|
|
||||||
|
# Copy static files
|
||||||
|
COPY /static/css/* ${STATIC_CONFIG_PATH}/css/
|
||||||
|
COPY /static/img/* ${STATIC_CONFIG_PATH}/img/
|
||||||
|
|
||||||
|
# Copy configuration and data files
|
||||||
|
COPY /configs/emqx_exhook.conf /opt/emqx/etc/plugins/
|
||||||
|
COPY /data/loaded_plugins /opt/emqx/data/
|
||||||
|
|
||||||
EXPOSE 1883 8083 8084 8883 11883 18083 4370 5369
|
EXPOSE 1883 8083 8084 8883 11883 18083 4370 5369
|
||||||
|
|
||||||
COPY ./entrypoint.sh /opt/emqx/bin/entrypoint.sh
|
COPY ./entrypoint.sh /opt/emqx/bin/entrypoint.sh
|
||||||
USER root
|
USER root
|
||||||
RUN chmod +x /opt/emqx/bin/entrypoint.sh
|
RUN chmod +x /opt/emqx/bin/entrypoint.sh
|
||||||
ENTRYPOINT ["/opt/emqx/bin/entrypoint.sh"]
|
ENTRYPOINT ["/opt/emqx/bin/entrypoint.sh"]
|
||||||
|
|||||||
14
ReadMe.md
14
ReadMe.md
@ -1,14 +1,12 @@
|
|||||||
|
|
||||||
1. docker build -t registry.entgra.io/entgra-emqx:4.4.11 -f Dockerfile .
|
1. docker build -t registry.entgra.io/entgra-emqx:4.4.11-entgra-v2 -f Dockerfile .
|
||||||
2. docker-compose up -d
|
2. Change Application server hostname in docker-compose
|
||||||
3. docker exec -it $(docker ps -aq -n 1) /bin/bash
|
3. docker-compose up -d
|
||||||
4. docker-compose down
|
4. docker exec -it $(docker ps -aq -n 1) /bin/bash
|
||||||
|
5. docker-compose down
|
||||||
|
|
||||||
Note:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
For more emqx-docker things:
|
For more emqx-docker things:
|
||||||
|
|
||||||
https://github.com/emqx/emqx/tree/master/deploy/docker
|
https://github.com/emqx/emqx/tree/master/deploy/docker
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,3 +1,19 @@
|
|||||||
|
## Copyright (c) 2018 - 2024, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||||
|
##
|
||||||
|
## Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||||
|
## Version 2.0 (the "License"); you may not use this file except
|
||||||
|
## in compliance with the License.
|
||||||
|
## You may obtain a copy of the License at
|
||||||
|
##
|
||||||
|
## http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
##
|
||||||
|
## Unless required by applicable law or agreed to in writing,
|
||||||
|
## software distributed under the License is distributed on an
|
||||||
|
## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
## KIND, either express or implied. See the License for the
|
||||||
|
## specific language governing permissions and limitations
|
||||||
|
## under the License.
|
||||||
|
|
||||||
##====================================================================
|
##====================================================================
|
||||||
## EMQX Hooks
|
## EMQX Hooks
|
||||||
##====================================================================
|
##====================================================================
|
||||||
@ -48,7 +64,7 @@
|
|||||||
## The gRPC server url
|
## The gRPC server url
|
||||||
##
|
##
|
||||||
## exhook.server.$name.url = url()
|
## exhook.server.$name.url = url()
|
||||||
exhook.server.default.url = http://host.docker.internal:9000
|
exhook.server.default.url = http://${SERVER_HOSTNAME}:9000
|
||||||
|
|
||||||
#exhook.server.default.ssl.cacertfile = etc/certs/cacert.pem
|
#exhook.server.default.ssl.cacertfile = etc/certs/cacert.pem
|
||||||
#exhook.server.default.ssl.certfile = etc/certs/cert.pem
|
#exhook.server.default.ssl.certfile = etc/certs/cert.pem
|
||||||
|
|||||||
9
data/loaded_plugins
Normal file
9
data/loaded_plugins
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{emqx_management,true}.
|
||||||
|
{emqx_dashboard,true}.
|
||||||
|
{emqx_modules,false}.
|
||||||
|
{emqx_retainer,true}.
|
||||||
|
{emqx_recon,true}.
|
||||||
|
{emqx_telemetry,true}.
|
||||||
|
{emqx_rule_engine,true}.
|
||||||
|
{emqx_bridge_mqtt,false}.
|
||||||
|
{emqx_exhook,true}.
|
||||||
@ -1,8 +1,24 @@
|
|||||||
|
# Copyright (c) 2018 - 2024, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||||
|
# Version 2.0 (the "License"); you may not use this file except
|
||||||
|
# in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
entgra-emqx:
|
entgra-emqx:
|
||||||
image: registry.entgra.io/entgra-emqx:4.4.11
|
image: registry.entgra.io/entgra-emqx:4.4.11-entgra-v2
|
||||||
container_name: entgra-emqx
|
container_name: entgra-emqx
|
||||||
restart: always
|
restart: always
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
@ -18,9 +34,9 @@ services:
|
|||||||
- ./static:/opt/emqx/static
|
- ./static:/opt/emqx/static
|
||||||
- ./configs:/opt/emqx/configs
|
- ./configs:/opt/emqx/configs
|
||||||
|
|
||||||
# environment:
|
environment:
|
||||||
# Hostname configurations
|
# Hostname configurations
|
||||||
# - MGT_HOSTNAME=localhost
|
- SERVER_HOSTNAME=host_name
|
||||||
# - MGT_HTTPS_PORT=9443
|
# - MGT_HTTPS_PORT=9443
|
||||||
# - MGT_HTTP_PORT=9763
|
# - MGT_HTTP_PORT=9763
|
||||||
#
|
#
|
||||||
|
|||||||
@ -1,11 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "copying static content"
|
# Copyright (c) 2018 - 2024, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved.
|
||||||
STATIC_CONFIG_PATH=/opt/emqx/lib/emqx_dashboard-4.4.10/priv/www/static/
|
#
|
||||||
cp /opt/emqx/static/css/* $STATIC_CONFIG_PATH/css/
|
# Entgra (Pvt) Ltd. licenses this file to you under the Apache License,
|
||||||
cp /opt/emqx/static/img/* $STATIC_CONFIG_PATH/img/
|
# Version 2.0 (the "License"); you may not use this file except
|
||||||
|
# in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
cp /opt/emqx/configs/emqx_exhook.conf /opt/emqx/etc/plugins/
|
CONFIG_PATH=/opt/emqx/etc/plugins/emqx_exhook.conf
|
||||||
|
|
||||||
|
# Set emqx_exhook.conf configs
|
||||||
|
sed -i 's/${SERVER_HOSTNAME}/'$SERVER_HOSTNAME'/g' $CONFIG_PATH
|
||||||
|
|
||||||
echo "Starting server.."
|
echo "Starting server.."
|
||||||
sh /opt/emqx/bin/emqx foreground
|
sh /opt/emqx/bin/emqx foreground
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user