diff --git a/Dockerfile b/Dockerfile index a764bc2..4e1f01b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,4 +37,8 @@ EXPOSE 80 # VOLUME [ "/taiko-web/public/songs" ] ENV TAIKO_URL http://taiko.example.com ENV TAIKO_VERSION Nanahira +ENV TAIKO_REDIS_HOST 127.0.0.1 +ENV TAIKO_REDIS_PORT 6379 +#ENV TAIKO_REDIS_PASSWORD blank +ENV TAIKO_REDIS_DB 0 CMD [ "/taiko-web/docker/entrypoint.sh" ] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d06d4d9..88d02ab 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,5 +1,5 @@ #!/bin/bash -echo "{\"songs_baseurl\":\"$TAIKO_URL/songs/\",\"assets_baseurl\":\"$TAIKO_URL/assets/\"}" | tee ./config.json +echo "{\"songs_baseurl\":\"$TAIKO_URL/songs/\",\"assets_baseurl\":\"$TAIKO_URL/assets/\",\"redis_host\":\"$TAIKO_REDIS_HOST\",\"redis_port\":$TAIKO_REDIS_PORT,\"redis_password\":\"$TAIKO_REDIS_PASSWORD\",\"redis_db\":$TAIKO_REDIS_DB}" | tee ./config.json echo "{\"commit\":\"$(git log --pretty=%H -1)\",\"commit_short\":\"$(git log --pretty=%h -1)\",\"version\": \"$TAIKO_VERSION\"}" | tee ./version.json pm2-docker start ./docker/pm2-docker.json