From c4f3bec3188dfbb7288afda9e8db54fac168af35 Mon Sep 17 00:00:00 2001 From: Felix Date: Sun, 9 Feb 2020 14:35:18 +0100 Subject: [PATCH] move docker files to seperate subfolder --- README.md | 3 ++- Dockerfile => docker/Dockerfile | 2 +- nginx.conf => docker/nginx.conf | 0 generate-instances-json.py => generate-instances-list.py | 6 ++---- 4 files changed, 5 insertions(+), 6 deletions(-) rename Dockerfile => docker/Dockerfile (84%) rename nginx.conf => docker/nginx.conf (100%) rename generate-instances-json.py => generate-instances-list.py (88%) diff --git a/README.md b/README.md index 6465eab..6c307a0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ $ npm run serve ## Build for production ``` -# sudo docker build . -t joinpeertube +python3 generate-instances-list.py +# docker build . -f docker/Dockerfile -t joinpeertube # docker run -it --rm -p 8080:80 --name joinpeertube joinpeertube ``` diff --git a/Dockerfile b/docker/Dockerfile similarity index 84% rename from Dockerfile rename to docker/Dockerfile index 780426b..555ecd3 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -14,4 +14,4 @@ RUN yarn run build FROM nginx as production-stage RUN mkdir /app COPY --from=build-stage /app/dist /app -COPY nginx.conf /etc/nginx/nginx.conf +COPY docker/nginx.conf /etc/nginx/nginx.conf diff --git a/nginx.conf b/docker/nginx.conf similarity index 100% rename from nginx.conf rename to docker/nginx.conf diff --git a/generate-instances-json.py b/generate-instances-list.py similarity index 88% rename from generate-instances-json.py rename to generate-instances-list.py index 769fbcb..d50995b 100644 --- a/generate-instances-json.py +++ b/generate-instances-list.py @@ -9,10 +9,8 @@ json_list = [] id = 0 for i in instance_list: config_json = requests.get('https://' + i + '/api/v1/config').json() - about = requests.get('https://' + i + '/api/v1/config/about') - stats = requests.get('https://' + i + '/api/v1/server/stats') - about_json = about.json() - stats_json = stats.json() + about_json = requests.get('https://' + i + '/api/v1/config/about').json() + stats_json = requests.get('https://' + i + '/api/v1/server/stats').json() data = { "id": id,