clean up after docker changes

This commit is contained in:
Karol Wypchlo 2020-07-30 12:00:58 +02:00
parent d571288b8e
commit 02b77cfbab
5 changed files with 15 additions and 15 deletions

View File

@ -8,7 +8,7 @@ services:
docker-host: docker-host:
image: qoomon/docker-host image: qoomon/docker-host
container_name: docker-host container_name: docker-host
restart: on-failure restart: unless-stopped
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
- NET_RAW - NET_RAW
@ -20,7 +20,7 @@ services:
context: ./docker/caddy context: ./docker/caddy
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: caddy container_name: caddy
restart: on-failure restart: unless-stopped
env_file: env_file:
- .env - .env
volumes: volumes:
@ -41,7 +41,7 @@ services:
context: . context: .
dockerfile: ./docker/nginx/Dockerfile dockerfile: ./docker/nginx/Dockerfile
container_name: nginx container_name: nginx
restart: on-failure restart: unless-stopped
env_file: env_file:
- .env - .env
volumes: volumes:
@ -61,9 +61,9 @@ services:
context: ./docker/handshake context: ./docker/handshake
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: handshake container_name: handshake
restart: on-failure restart: unless-stopped
command: hnd --log-console=false
environment: environment:
- HSD_LOG_CONSOLE=false
- HSD_HTTP_HOST=0.0.0.0 - HSD_HTTP_HOST=0.0.0.0
- HSD_NETWORK=main - HSD_NETWORK=main
- HSD_PORT=12037 - HSD_PORT=12037
@ -81,17 +81,15 @@ services:
context: . context: .
dockerfile: ./docker/handshake-api/Dockerfile dockerfile: ./docker/handshake-api/Dockerfile
container_name: handshake-api container_name: handshake-api
restart: on-failure restart: unless-stopped
networks:
- shared
environment: environment:
- HSD_HOST=handshake - HSD_HOST=handshake
- HSD_NETWORK=main - HSD_NETWORK=main
- HSD_PORT=12037 - HSD_PORT=12037
- HOST=0.0.0.0
- NODE_TLS_REJECT_UNAUTHORIZED=0
env_file: env_file:
- .env - .env
networks:
- shared
expose: expose:
- 3100 - 3100
depends_on: depends_on:
@ -103,7 +101,7 @@ services:
context: . context: .
dockerfile: ./docker/health-check/Dockerfile dockerfile: ./docker/health-check/Dockerfile
container_name: health-check container_name: health-check
restart: on-failure restart: unless-stopped
volumes: volumes:
- ./health-check:/usr/app/health-check - ./health-check:/usr/app/health-check
- ./docker/data/health-check/state:/usr/app/state - ./docker/data/health-check/state:/usr/app/state

View File

@ -2,7 +2,7 @@ const express = require("express");
const proxy = require("express-http-proxy"); const proxy = require("express-http-proxy");
const { NodeClient } = require("hs-client"); const { NodeClient } = require("hs-client");
const host = process.env.HOST || "localhost"; const host = process.env.HOSTNAME || "0.0.0.0";
const port = Number(process.env.PORT) || 3100; const port = Number(process.env.PORT) || 3100;
const hsdNetworkType = process.env.HSD_NETWORK || "regtest"; const hsdNetworkType = process.env.HSD_NETWORK || "regtest";

View File

@ -10,7 +10,7 @@ const bodyparser = require("body-parser");
require("./schedule"); require("./schedule");
const host = process.env.HOSTNAME || "0.0.0.0"; const host = process.env.HOSTNAME || "0.0.0.0";
const port = process.env.PORT || 3100; const port = Number(process.env.PORT) || 3100;
const server = express(); const server = express();

View File

@ -11,4 +11,6 @@ const job = schedule.scheduleJob("*/5 * * * *", async () => {
db.get("entries").push(entry).write(); db.get("entries").push(entry).write();
}); });
job.invoke(); setTimeout(() => {
job.invoke();
}, 60 * 1000); // delay for 60s to give other services time to start up

View File

@ -10,7 +10,7 @@ source /home/user/.bashrc
# Add SSH keys and set SSH configs # Add SSH keys and set SSH configs
sudo cp /home/user/skynet-webportal/setup-scripts/support/ssh_config /etc/ssh/ssh_config sudo cp /home/user/skynet-webportal/setup-scripts/support/ssh_config /etc/ssh/ssh_config
mkdir -p /home/user/.ssh mkdir -p /home/user/.ssh
cat /home/user/skynet-webportal/setup-scripts/support/authorized_keys >> /home/user/.ssh/authorized_keys cat /home/user/skynet-webportal/setup-scripts/support/authorized_keys >> /home/user/.ssh/authorized_keys
# Install apt packages # Install apt packages
sudo apt-get update sudo apt-get update