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,