From f12fa81d928793bfd45dab6da1291d163419abc9 Mon Sep 17 00:00:00 2001 From: CaKrome <29881067+CaKrome@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:30:05 -0400 Subject: [PATCH] use .env file for ports --- .env.sample | 1 + .gitignore | 3 +++ config.json => config.json.sample | 0 docker-compose.yml | 5 +++-- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .env.sample create mode 100644 .gitignore rename config.json => config.json.sample (100%) diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..edc7270 --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +PORT=8388 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b55dde0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +.env +config.json diff --git a/config.json b/config.json.sample similarity index 100% rename from config.json rename to config.json.sample diff --git a/docker-compose.yml b/docker-compose.yml index c4d56ff..58eef57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,8 +5,9 @@ services: dockerfile: Dockerfile container_name: ss-rust ports: - - "8388:8388/tcp" - - "8388:8388/udp" + - "${PORT}:${PORT}/tcp" + - "${PORT}:${PORT}/udp" + env_file: .env volumes: - type: bind source: ./config.json