deploy redis to fly.io
This commit is contained in:
parent
c9f8eab97f
commit
7860cbb90d
6
deployments/quirrel-redis/Dockerfile
Normal file
6
deployments/quirrel-redis/Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM redis:alpine
|
||||
|
||||
ADD start-redis-server.sh /usr/bin/
|
||||
RUN chmod +x /usr/bin/start-redis-server.sh
|
||||
|
||||
CMD ["start-redis-server.sh"]
|
5
deployments/quirrel-redis/fly.toml
Normal file
5
deployments/quirrel-redis/fly.toml
Normal file
@ -0,0 +1,5 @@
|
||||
app = "quirrel-redis-prod"
|
||||
|
||||
[[mounts]]
|
||||
destination = "/data"
|
||||
source = "redis_data"
|
13
deployments/quirrel-redis/readme.md
Normal file
13
deployments/quirrel-redis/readme.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Redis
|
||||
|
||||
Redis instance running on fly.io
|
||||
|
||||
### How to
|
||||
|
||||
```shell
|
||||
flyctl launch --name quirrel-redis-prod
|
||||
node -e "console.log(crypto.randomBytes(16).toString('hex'))" # copy its output
|
||||
flyctl secrets set REDIS_PASSWORD= # paste the 32-character long password copied previously
|
||||
flyctl volumes create redis_data --region cdg
|
||||
flyctl deploy
|
||||
```
|
4
deployments/quirrel-redis/start-redis-server.sh
Normal file
4
deployments/quirrel-redis/start-redis-server.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
sysctl vm.overcommit_memory=1
|
||||
sysctl net.core.somaxconn=1024
|
||||
redis-server --requirepass $REDIS_PASSWORD --dir /data/ --appendonly yes
|
Loading…
Reference in New Issue
Block a user