ソースを参照

Allow custom redis and psql servers to be set through .env

master
jfederico 4年前
コミット
0ecf2ccf99
2個のファイルの変更6行の追加6行の削除
  1. 4
    6
      docker-compose.yml
  2. 2
    0
      dotenv

+ 4
- 6
docker-compose.yml ファイルの表示

@@ -14,11 +14,9 @@ services:
14 14
       - ./nginx/sites.template:/etc/nginx/sites-available/sites.template
15 15
       - ./nginx/default/html:/var/www/html
16 16
       - ./nginx/log/nginx:/var/log/nginx
17
-## Configuration for Letsencrypt SSL Certificate
18 17
       - ./data/certbot/conf:/etc/letsencrypt
19 18
       - ./data/certbot/www:/var/www/certbot
20
-## Configuration for Letsencrypt SSL Certificate
21
-#      - ./nginx/ssl/:/etc/ssl
19
+      - ./nginx/ssl/:/etc/ssl
22 20
     ports:
23 21
       - "80:80"
24 22
       - "443:443"
@@ -79,8 +77,8 @@ services:
79 77
       - ./scalelite/tmp/cache/assets:/usr/src/app/tmp/cache/assets
80 78
     env_file: ./scalelite/.env
81 79
     environment:
82
-      - REDIS_URL=redis://redis:6379
83
-      - DATABASE_URL=postgres://postgres:password@postgres:5432/scalelite?pool=5
80
+      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
81
+      - DATABASE_URL=${DATABASE_URL:-postgres://postgres:password@postgres:5432/scalelite?pool=5}
84 82
       - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}
85 83
 
86 84
 
@@ -97,5 +95,5 @@ services:
97 95
       - ./scalelite/bin/start-poller:/srv/scalelite/bin/start-poller
98 96
     env_file: ./scalelite/.env
99 97
     environment:
100
-      - REDIS_URL=redis://redis:6379
98
+      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
101 99
       - URL_HOST=${HOST_NAME:-sl.xlab.blindside-dev.com}

+ 2
- 0
dotenv ファイルの表示

@@ -1 +1,3 @@
1 1
 HOST_NAME=sl.xlab.blindside-dev.com
2
+REDIS_URL=redis://redis:6379
3
+DATABASE_URL=postgres://postgres:password@postgres:5432/scalelite?pool=5

読み込み中…
キャンセル
保存