From 42116724e2150c5886001d9ee3cb7b246cac0054 Mon Sep 17 00:00:00 2001 From: Nate Vick Date: Tue, 28 Jul 2020 07:50:45 -0700 Subject: [PATCH 1/2] do not expose ports for support services --- .../templates/install/memcached/docker-compose.yml.erb | 2 -- lib/railsdock/templates/install/memcached/memcached.env | 3 +-- lib/railsdock/templates/install/mysql/docker-compose.yml.erb | 2 -- lib/railsdock/templates/install/mysql/mysql.env | 1 - .../templates/install/postgres/docker-compose.yml.erb | 2 -- lib/railsdock/templates/install/postgres/postgres.env | 3 +-- lib/railsdock/templates/install/redis/docker-compose.yml.erb | 2 -- lib/railsdock/templates/install/redis/redis.env | 3 +-- 8 files changed, 3 insertions(+), 15 deletions(-) diff --git a/lib/railsdock/templates/install/memcached/docker-compose.yml.erb b/lib/railsdock/templates/install/memcached/docker-compose.yml.erb index 84fb246..aa49729 100644 --- a/lib/railsdock/templates/install/memcached/docker-compose.yml.erb +++ b/lib/railsdock/templates/install/memcached/docker-compose.yml.erb @@ -5,7 +5,5 @@ context: <%= dockerfile_dir %>memcached args: - MEMCACHED_VERSION=${MEMCACHED_VERSION} - ports: - - "${MEMCACHED_HOST_PORT}:11211" volumes: - memcached:/var/lib/memcached \ No newline at end of file diff --git a/lib/railsdock/templates/install/memcached/memcached.env b/lib/railsdock/templates/install/memcached/memcached.env index 3b56c30..5360558 100644 --- a/lib/railsdock/templates/install/memcached/memcached.env +++ b/lib/railsdock/templates/install/memcached/memcached.env @@ -2,5 +2,4 @@ ### MEMCACHED ################################################################# -MEMCACHED_VERSION=1.5 -MEMCACHED_HOST_PORT=11211 \ No newline at end of file +MEMCACHED_VERSION=1.5 \ No newline at end of file diff --git a/lib/railsdock/templates/install/mysql/docker-compose.yml.erb b/lib/railsdock/templates/install/mysql/docker-compose.yml.erb index 4d70e11..b8e9c7b 100644 --- a/lib/railsdock/templates/install/mysql/docker-compose.yml.erb +++ b/lib/railsdock/templates/install/mysql/docker-compose.yml.erb @@ -7,7 +7,5 @@ - MYSQL_VERSION=${MYSQL_VERSION} environment: - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - ports: - - "${MYSQL_HOST_PORT}:3306" volumes: - mysql:/var/lib/mysql \ No newline at end of file diff --git a/lib/railsdock/templates/install/mysql/mysql.env b/lib/railsdock/templates/install/mysql/mysql.env index ba7d997..7dba90b 100644 --- a/lib/railsdock/templates/install/mysql/mysql.env +++ b/lib/railsdock/templates/install/mysql/mysql.env @@ -3,5 +3,4 @@ ### MYSQL ##################################################################### MYSQL_VERSION=5.7 -MYSQL_HOST_PORT=3306 MYSQL_ROOT_PASSWORD=Password1 \ No newline at end of file diff --git a/lib/railsdock/templates/install/postgres/docker-compose.yml.erb b/lib/railsdock/templates/install/postgres/docker-compose.yml.erb index 3a048e2..d30d92a 100644 --- a/lib/railsdock/templates/install/postgres/docker-compose.yml.erb +++ b/lib/railsdock/templates/install/postgres/docker-compose.yml.erb @@ -7,7 +7,5 @@ - POSTGRES_VERSION=${POSTGRES_VERSION} environment: - POSTGRES_HOST_AUTH_METHOD=trust - ports: - - "${POSTGRES_HOST_PORT}:5432" volumes: - postgres:/var/lib/postgresql/data \ No newline at end of file diff --git a/lib/railsdock/templates/install/postgres/postgres.env b/lib/railsdock/templates/install/postgres/postgres.env index c23c17e..3aa6a3d 100644 --- a/lib/railsdock/templates/install/postgres/postgres.env +++ b/lib/railsdock/templates/install/postgres/postgres.env @@ -2,5 +2,4 @@ ### POSTGRES ################################################################## -POSTGRES_VERSION=11 -POSTGRES_HOST_PORT=5432 \ No newline at end of file +POSTGRES_VERSION=11 \ No newline at end of file diff --git a/lib/railsdock/templates/install/redis/docker-compose.yml.erb b/lib/railsdock/templates/install/redis/docker-compose.yml.erb index ab89ffc..8b1b341 100644 --- a/lib/railsdock/templates/install/redis/docker-compose.yml.erb +++ b/lib/railsdock/templates/install/redis/docker-compose.yml.erb @@ -5,7 +5,5 @@ context: <%= dockerfile_dir %>redis args: - REDIS_VERSION=${REDIS_VERSION} - ports: - - "${REDIS_HOST_PORT}:6379" volumes: - redis:/data \ No newline at end of file diff --git a/lib/railsdock/templates/install/redis/redis.env b/lib/railsdock/templates/install/redis/redis.env index de43c6c..a4db4b6 100644 --- a/lib/railsdock/templates/install/redis/redis.env +++ b/lib/railsdock/templates/install/redis/redis.env @@ -2,5 +2,4 @@ ### REDIS ##################################################################### -REDIS_VERSION=4 -REDIS_HOST_PORT=6379 \ No newline at end of file +REDIS_VERSION=4 \ No newline at end of file From cdddb9849aaed41af3c2c98a535530d95ad57e72 Mon Sep 17 00:00:00 2001 From: Nate Vick Date: Tue, 28 Jul 2020 08:02:36 -0700 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4313a19..bf19a8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Added ### Changed +- default to exposing only necessary ports [PR26](https://github.com/hintmedia/railsdock/pull/26) ### Deprecated ### Removed ### Fixed