From b1750af76288db8f10f9bdc23ab898d46282889e Mon Sep 17 00:00:00 2001 From: George Vlahavas Date: Sat, 27 Mar 2021 12:36:56 +0200 Subject: [PATCH] Add a startup script Use it to set change the hostname to that provided by the APP_URL variable. --- api/Dockerfile | 2 +- api/start.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 api/start.sh diff --git a/api/Dockerfile b/api/Dockerfile index 6c7ad92..74fc85d 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -50,4 +50,4 @@ USER www # Expose port 9000 and start php-fpm server EXPOSE 9000 -CMD ["php-fpm"] +CMD ["./start.sh"] diff --git a/api/start.sh b/api/start.sh new file mode 100755 index 0000000..3c59e50 --- /dev/null +++ b/api/start.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +sed -i "s/localhost:5611/${APP_URL}/g" ./api/public/js/* +php-fpm -- 2.2.2