Browse Source

Adds REDIS_PASSWORD secret

master
Logan Koester 3 years ago
parent
commit
b0a3961cbe
No known key found for this signature in database GPG Key ID: EBA7BD5CB8B7CB94
  1. 6
      .drone.yml
  2. 1
      src/index.js
  3. 7
      waypoint.hcl

6
.drone.yml

@ -21,6 +21,8 @@ steps:
environment:
WAYPOINT_SERVER_TOKEN:
from_secret: WAYPOINT_SERVER_TOKEN
WP_VAR_redis_password:
from_secret: REDIS_PASSWORD
- name: deploy
image: registry.gitlab.com/gitlab-org/waypoint-images:latest
@ -32,6 +34,8 @@ steps:
environment:
WAYPOINT_SERVER_TOKEN:
from_secret: WAYPOINT_SERVER_TOKEN
WP_VAR_redis_password:
from_secret: REDIS_PASSWORD
- name: release
image: registry.gitlab.com/gitlab-org/waypoint-images:latest
@ -43,6 +47,8 @@ steps:
environment:
WAYPOINT_SERVER_TOKEN:
from_secret: WAYPOINT_SERVER_TOKEN
WP_VAR_redis_password:
from_secret: REDIS_PASSWORD
volumes:
- name: dockersock

1
src/index.js

@ -37,6 +37,7 @@ const init = async () => {
//partition: 'my_cached_data',
host: (process.env.REDIS_HOST || 'localhost'),
port: (process.env.REDIS_PORT || 6379),
password: process.env.REDIS_PASSWORD,
database: 0,
//tls: {},
},

7
waypoint.hcl

@ -18,6 +18,7 @@ app "page-recorder" {
env = {
REDIS_HOST = var.redis_host
REDIS_PORT = var.redis_port
REDIS_PASSWORD = var.redis_password
}
}
@ -40,6 +41,7 @@ app "page-recorder" {
"NODE_ENV": "production"
"REDIS_HOST": var.redis_host
"REDIS_PORT": var.redis_port
"REDIS_PASSWORD": var.redis_password
}
labels = {
@ -75,3 +77,8 @@ variable "redis_port" {
default = 6379
description = "Redis port"
}
variable "redis_password" {
type = string
description = "Redis password"
}

Loading…
Cancel
Save