1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00

first commit

This commit is contained in:
Nebel 2020-06-12 16:48:09 +09:00
parent b196d6e13b
commit 497cb16681
4 changed files with 44 additions and 0 deletions

3
Dockerfile Normal file
View file

@ -0,0 +1,3 @@
FROM rediscommander/redis-commander
COPY entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]

12
docker-compose.yml Normal file
View file

@ -0,0 +1,12 @@
version: "3"
services:
redis:
image: redis:alpine
app:
build: "."
ports: ["8081:8081"]
links: [redis]
environment:
- FLY_REDIS_CACHE_URL=redis://redis
- HTTP_USER
- HTTP_PASSWORD

8
entrypoint.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
set -e
export PORT=${PORT:-8080}
REDIS_HOST=`node -p "new URL('${FLY_REDIS_CACHE_URL}').hostname"`
REDIS_PORT=`node -p "new URL('${FLY_REDIS_CACHE_URL}').port"`
REDIS_PASSWORD=`node -p "new URL('${FLY_REDIS_CACHE_URL}').password"`
export REDIS_HOST=${REDIS_HOST:-localhost} REDIS_PORT=${REDIS_PORT:-6379} REDIS_PASSWORD
/redis-commander/docker/entrypoint.sh "$@"

21
fly.toml Normal file
View file

@ -0,0 +1,21 @@
app = "redis-commander-example"
[[services]]
internal_port = 8080
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
[[services.ports]]
handlers = ["http"]
port = "80"
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
[[services.tcp_checks]]
interval = 10000
timeout = 2000