From 3e1a481b83131758cea66033805761198abad2ec Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Thu, 17 Sep 2020 15:38:00 +0000 Subject: [PATCH] Make the stack build. Avoid netwrokig overlap with local net. --- docker-compose.yml | 57 +++++++++++++++++++------------------- docker/sia/Dockerfile | 2 +- packages/webapp/Dockerfile | 4 +-- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 78db2c61..e62e3dd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ networks: ipam: driver: default config: - - subnet: 192.168.0.0/24 + - subnet: 10.0.0.0/24 volumes: webapp: @@ -17,6 +17,9 @@ services: dockerfile: Dockerfile args: branch: v1.5.0 + image: sia + deploy: + mode: global container_name: sia restart: unless-stopped environment: @@ -24,30 +27,10 @@ services: env_file: - .env volumes: - - ./docker/data/sia:/sia-data + - /media/sf_sia_data:/sia-data networks: shared: - ipv4_address: 192.168.0.10 - expose: - - 9980 - - sia-upload: - build: - context: ./docker/sia - dockerfile: Dockerfile - args: - branch: v1.5.0 - container_name: sia-upload - restart: unless-stopped - environment: - - SIA_MODULES=gctwr - env_file: - - .env-upload - volumes: - - ./docker/data/sia-upload:/sia-data - networks: - shared: - ipv4_address: 192.168.0.11 + ipv4_address: 10.0.0.10 expose: - 9980 @@ -55,6 +38,9 @@ services: build: context: ./docker/caddy dockerfile: Dockerfile + image: caddy + deploy: + mode: global container_name: caddy restart: unless-stopped env_file: @@ -65,7 +51,7 @@ services: - ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile networks: shared: - ipv4_address: 192.168.0.20 + ipv4_address: 10.0.0.20 ports: - "80:80" - "443:443" @@ -74,6 +60,8 @@ services: nginx: image: openresty/openresty:1.15.8.3-2-xenial + deploy: + mode: global container_name: nginx restart: unless-stopped env_file: @@ -87,7 +75,7 @@ services: - webapp:/var/www/webportal:ro networks: shared: - ipv4_address: 192.168.0.30 + ipv4_address: 10.0.0.30 expose: - 80 depends_on: @@ -99,6 +87,9 @@ services: build: context: ./packages/webapp dockerfile: Dockerfile + image: webapp + deploy: + mode: global container_name: webapp restart: unless-stopped tty: true @@ -109,6 +100,9 @@ services: build: context: ./docker/handshake dockerfile: Dockerfile + image: handhsake + deploy: + mode: global container_name: handshake restart: unless-stopped environment: @@ -122,7 +116,7 @@ services: - ./docker/data/handshake/.hsd:/root/.hsd networks: shared: - ipv4_address: 192.168.0.40 + ipv4_address: 10.0.0.40 expose: - 12037 @@ -130,6 +124,9 @@ services: build: context: ./packages/handshake-api dockerfile: Dockerfile + image: handshake-api + deploy: + mode: global container_name: handshake-api restart: unless-stopped environment: @@ -141,7 +138,7 @@ services: - .env networks: shared: - ipv4_address: 192.168.0.50 + ipv4_address: 10.0.0.50 expose: - 3100 depends_on: @@ -151,13 +148,16 @@ services: build: context: ./packages/health-check dockerfile: Dockerfile + image: health-check + deploy: + mode: global container_name: health-check restart: unless-stopped volumes: - ./docker/data/health-check/state:/usr/app/state networks: shared: - ipv4_address: 192.168.0.60 + ipv4_address: 10.0.0.60 environment: - HOSTNAME=0.0.0.0 - PORTAL_URL=nginx @@ -166,3 +166,4 @@ services: depends_on: - handshake - handshake-api + diff --git a/docker/sia/Dockerfile b/docker/sia/Dockerfile index 91b19037..923a8ca1 100644 --- a/docker/sia/Dockerfile +++ b/docker/sia/Dockerfile @@ -8,6 +8,6 @@ ARG branch=master RUN git clone https://gitlab.com/NebulousLabs/Sia.git --single-branch --branch ${branch} RUN make release --directory Sia -FROM nebulouslabs/sia:1.5.0.3 +FROM nebulouslabs/sia:dev COPY --from=sia-builder /go/bin/siac /go/bin/siad /usr/bin/ diff --git a/packages/webapp/Dockerfile b/packages/webapp/Dockerfile index d2f21447..8090b8b1 100644 --- a/packages/webapp/Dockerfile +++ b/packages/webapp/Dockerfile @@ -9,5 +9,5 @@ COPY package.json . ENV CYPRESS_INSTALL_BINARY 0 ENV GATSBY_TELEMETRY_DISABLED 1 -RUN yarn --no-lockfile -RUN yarn build \ No newline at end of file +RUN yarn --no-lockfile --network-timeout 100000 +RUN yarn build