-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
535c4c6
commit ebd7abd
Showing
16 changed files
with
231 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
version: "3" | ||
services: | ||
influxdb: | ||
image: influxdb:${INFLUXDB_DEV_TAG} | ||
container_name: influxdb-dev | ||
ports: | ||
- '8086:8086' | ||
# restart: always | ||
logging: | ||
options: | ||
max-size: "10m" | ||
max-file: "1" | ||
environment: | ||
- DOCKER_INFLUXDB_INIT_CLI_CONFIG_NAME=${DOCKER_INFLUXDB_INIT_CLI_CONFIG_NAME} | ||
- DOCKER_INFLUXDB_INIT_MODE=setup | ||
- DOCKER_INFLUXDB_INIT_USERNAME=${INFLUXDB_DEV_INIT_USERNAME} | ||
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_DEV_INIT_PASSWORD} | ||
- DOCKER_INFLUXDB_INIT_BUCKET=${INFLUXDB_DEV_INIT_BUCKET} | ||
- DOCKER_INFLUXDB_INIT_ORG=${INFLUXDB_DEV_ORG} | ||
- DOCKER_INFLUXDB_INIT_RETENTION=${INFLUXDB_DEV_RETENTION} | ||
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${DOCKER_INFLUXDB_INIT_ADMIN_TOKEN} | ||
volumes: | ||
- /opt/influxdb2/data:/var/lib/influxdb2 # data directory | ||
mysqldb: | ||
image: mysql:5.7 | ||
restart: always | ||
environment: | ||
- MYSQL_DATABASE=${MYSQL_DATABASE} | ||
- MYSQL_USER=${MYSQL_USER} | ||
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_password | ||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password | ||
ports: | ||
- '3307:3306' | ||
secrets: | ||
- mysql_password | ||
- mysql_root_password | ||
volumes: | ||
- mysql-datavolume:/var/lib/mysql | ||
nats: | ||
image: 'nats:2.7.3-alpine3.15' | ||
restart: always | ||
logging: | ||
options: | ||
max-size: "2g" | ||
max-file: "1" | ||
network_mode: host | ||
grafana: | ||
build: | ||
context: "./telematic_apps/grafana" | ||
restart: always | ||
logging: | ||
options: | ||
max-size: "10m" | ||
max-file: "1" | ||
network_mode: host | ||
volumes: | ||
- /opt/grafana/logs:/var/log/grafana | ||
- ./telematic_apps/grafana/grafana.ini:/etc/grafana/grafana.ini | ||
- /opt/grafana/data:/var/lib/grafana | ||
- /opt/grafana/provisioning:/home/grafana/conf/provisioning | ||
- /home/ubuntu/.aws/credentials:/usr/share/grafana/.aws/credentials | ||
user: "472" #grafana user id | ||
telematic_web_server: | ||
build: | ||
context: "./telematic_apps/web_app/server" | ||
restart: always | ||
logging: | ||
options: | ||
max-size: "10m" | ||
max-file: "1" | ||
network_mode: host | ||
environment: | ||
- NODE_ENV=dev.comelopment | ||
- CHOKIDAR_USEPOLLING=true | ||
- ALLOW_CLIENT_URL=http://local.cav-telematics.com:8888 | ||
- GRAFANA_HTPASSWORD=/opt/apache2/grafana_htpasswd | ||
- SESSION_TIMEOUT=3600 | ||
- SECRET=my_secret_telematic_ui | ||
# Server port | ||
- PORT=9010 | ||
# MYSQL DB credentials. Need to be replaced with actual MYSQL DB during deployment | ||
- DB_HOST=127.0.0.1 | ||
- DB_PORT=3307 | ||
- DB_USER=telematic | ||
- DB_PASSWORD=telematic | ||
- GRAFANA_DB=wfd_grafana | ||
volumes: | ||
- /opt/apache2/grafana_htpasswd:/opt/apache2/grafana_htpasswd | ||
|
||
telematic_web_client: | ||
build: | ||
context: "./telematic_apps/web_app/client" | ||
args: | ||
REACT_APP_MESSAGING_SERVER_URI: "http://topic-service.local.cav-telematics.com:8888" | ||
REACT_APP_WEB_SERVER_URI: "http://ui-service.local.cav-telematics.com:8888" | ||
REACT_APP_GRAFANA_URI: "http://grafana.local.cav-telematics.com:8888/grafana" | ||
restart: always | ||
logging: | ||
options: | ||
max-size: "10m" | ||
max-file: "1" | ||
network_mode: host | ||
depends_on: | ||
- telematic_web_server | ||
|
||
apache2: | ||
build: | ||
context: "./telematic_apps/apache2" | ||
dockerfile: "./local.Dockerfile" | ||
restart: always | ||
logging: | ||
options: | ||
max-size: "10m" | ||
max-file: "1" | ||
network_mode: host | ||
environment: | ||
- CLIENT_LOCAL_URL=http://127.0.0.1:8082/ | ||
- GRAFANA_LOCAL_URL=http://127.0.0.1:3000/ | ||
- TOPICSERVICE_LOCAL_URL=http://127.0.0.1:8080/ | ||
- UISERVICE_LOCAL_URL=http://127.0.0.1:9010/ | ||
depends_on: | ||
- grafana | ||
- telematic_web_client | ||
- telematic_web_server | ||
volumes: | ||
- /opt/apache2/grafana_htpasswd:/etc/apache2/grafana_htpasswd | ||
|
||
telematic_messaging_server: | ||
build: | ||
context: "./telematic_cloud_messaging" | ||
dockerfile: "local.Dockerfile" | ||
depends_on: | ||
- nats | ||
restart: always | ||
logging: | ||
options: | ||
max-size: "2g" | ||
max-file: "1" | ||
network_mode: host | ||
environment: | ||
- NATS_URI=nats://localhost:4222 | ||
|
||
secrets: | ||
mysql_password: | ||
file: ./secrets/mysql_password.txt | ||
mysql_root_password: | ||
file: ./secrets/mysql_root_password.txt | ||
volumes: | ||
mysql-datavolume: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
docker exec -i mysql mysql -utelematic -ptelematic wfd_grafana < ./scripts/database/mysql_insert_values.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
echo '127.0.0.1 grafana.local.cav-telematics.com' >> /etc/hosts | ||
echo '127.0.0.1 ui-service.local.cav-telematics.com' >> /etc/hosts | ||
echo '127.0.0.1 topic-service.local.cav-telematics.com' >> /etc/hosts | ||
echo '127.0.0.1 local.cav-telematics.com' >> /etc/hosts | ||
if [ -d /opt/grafana ]; then | ||
echo "Directory /opt/grafana exists." | ||
else | ||
mkdir /opt/grafana | ||
fi | ||
chmod 777 -R /opt/grafana | ||
|
||
if [ /opt/apache2/grafana_htpasswd ]; then | ||
echo "File /opt/apache2/grafana_htpasswd exists." | ||
else | ||
touch /opt/apache2/grafana_htpasswd | ||
fi | ||
|
||
if [ -d /opt/influxdb2 ]; then | ||
echo "Directory /opt/influxdb2 exists." | ||
else | ||
mkdir /opt/influxdb2 | ||
fi | ||
chmod 777 -R /opt/influxdb2 | ||
|
||
cp telematic-local.env .env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu/apache2:latest | ||
RUN a2enmod proxy | ||
RUN a2enmod rewrite | ||
RUN a2enmod proxy_balancer | ||
RUN a2enmod proxy_http | ||
RUN a2enmod headers | ||
RUN touch /etc/apache2/grafana_htpasswd | ||
RUN chmod 777 /etc/apache2/grafana_htpasswd | ||
COPY ports.local.conf /etc/apache2/ports.conf | ||
COPY 000-default.local.conf /etc/apache2/sites-available/000-default.conf | ||
COPY 000-default.local.conf /etc/apache2/sites-enabled/000-default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# If you just change the port or add more ports here, you will likely also | ||
# have to change the VirtualHost statement in | ||
# /etc/apache2/sites-enabled/000-default.conf | ||
|
||
Listen 8888 | ||
|
||
<IfModule ssl_module> | ||
Listen 443 | ||
</IfModule> | ||
|
||
<IfModule mod_gnutls.c> | ||
Listen 443 | ||
</IfModule> | ||
|
||
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.