Skip to content

Commit

Permalink
perf($Docker): simplify docker compose by using environment variables
Browse files Browse the repository at this point in the history
simplify docker compose by using environment variables

BREAKING CHANGE: simplify docker compose by using environment variables
  • Loading branch information
johnnymillergh committed Feb 5, 2021
1 parent 9887360 commit 3216a95
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 763 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring:
zipkin:
base-url: http://maf.zipkin.development:9411
base-url: http://maf.zipkin.development-local:9411
devtools:
add-properties: true
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
spring:
zipkin:
base-url: http://maf.zipkin.development:9411
base-url: http://maf.zipkin.development-local:9411
devtools:
add-properties: true
datasource:
url: jdbc:mysql://maf.mysql.development:3306/muscle_and_fitness?useSSL=true&useUnicode=true
url: jdbc:mysql://maf.mysql.development-local:3306/muscle_and_fitness?useSSL=true&useUnicode=true
username: root
password: jm@mysql
redis:
host: maf.redis.development
host: maf.redis.development-local
port: 6379
password: 123456

sftp:
client:
configuration:
host: maf.atmoz-sftp.development
host: maf.atmoz-sftp.development-local
port: 22
user: johnny
password: atmoz@sftp
Expand Down
20 changes: 20 additions & 0 deletions docker/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# TAG must be corresponding with the version tag in pom.xml, need to modify it when new version releases
TAG=0.0.2-SNAPSHOT

# ENVIRONMENT could be 'development-docker', 'production', 'stage' or 'test'
ENVIRONMENT=development-local

# Docker container names (also docker container hostnames)
MYSQL_CONTAINER_NAME="maf.mysql.${ENVIRONMENT}"
REDIS_CONTAINER_NAME="maf.redis.${ENVIRONMENT}"
ATMOZ_SFTP_CONTAINER_NAME="maf.atmoz-sftp.${ENVIRONMENT}"
ZIPKIN_MYSQL_CONTAINER_NAME="maf.zipkin-mysql.${ENVIRONMENT}"
ZIPKIN_DEPENDENCIES_CONTAINER_NAME="maf.zipkin-dependencies.${ENVIRONMENT}"
ZIPKIN_CONTAINER_NAME="maf.zipkin.${ENVIRONMENT}"
CONSUL_SERVICE_REGISTRY_CONTAINER_NAME="maf.consul-service-registry.${ENVIRONMENT}"
SPRING_BOOT_ADMIN_CONTAINER_NAME="maf.spring-boot-admin.${ENVIRONMENT}"
API_GATEWAY_CONTAINER_NAME="maf.api-gateway.${ENVIRONMENT}"
AUTH_CENTER_CONTAINER_NAME="maf.auth-center.${ENVIRONMENT}"
EXERCISE_MIS_CONTAINER_NAME="maf.exercise-mis.${ENVIRONMENT}"
MUSCLE_MIS_CONTAINER_NAME="maf.muscle-mis.${ENVIRONMENT}"

# JIB contain's Java tool options
JAVA_TOOL_OPTIONS="-Xms128m -Xmx128m -Dspring.profiles.active=${ENVIRONMENT} -Dspring.cloud.consul.host=${CONSUL_SERVICE_REGISTRY_CONTAINER_NAME}"
240 changes: 0 additions & 240 deletions docker/docker-compose.production.yml

This file was deleted.

Loading

0 comments on commit 3216a95

Please sign in to comment.