Skip to content

Commit

Permalink
use env var for startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
cupcakearmy committed Jun 7, 2022
1 parent 35ba25b commit a257d2c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.3] - 2022-06-07

### Changed

- Use the value from the `MEMCACHE` env variable in startup script.

## [1.5.2] - 2022-06-07

### Added
Expand Down
2 changes: 1 addition & 1 deletion backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cryptgeon"
version = "1.5.2"
version = "1.5.3"
authors = ["cupcakearmy <[email protected]>"]
edition = "2021"

Expand Down
10 changes: 6 additions & 4 deletions entry.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/ash
#!/bin/sh

echo "Waiting for memcached"

while ! nc -z -w 1 memcached 11211; do
HOST=$(echo $MEMCACHE | cut -d: -f1)
PORT=$(echo $MEMCACHE | cut -d: -f2)
echo "Waiting for memcached at $HOST:$PORT"
while ! nc -z -w 1 $HOST $PORT; do
sleep 1
echo "..."
echo "retrying..."
done

echo "Starting server"
Expand Down

0 comments on commit a257d2c

Please sign in to comment.