Make the stack build. Avoid netwrokig overlap with local net.

This commit is contained in:
Ivaylo Novakov 2020-09-17 15:38:00 +00:00
parent 08782de656
commit 3e1a481b83
3 changed files with 32 additions and 31 deletions

View File

@ -5,7 +5,7 @@ networks:
ipam: ipam:
driver: default driver: default
config: config:
- subnet: 192.168.0.0/24 - subnet: 10.0.0.0/24
volumes: volumes:
webapp: webapp:
@ -17,6 +17,9 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
branch: v1.5.0 branch: v1.5.0
image: sia
deploy:
mode: global
container_name: sia container_name: sia
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -24,30 +27,10 @@ services:
env_file: env_file:
- .env - .env
volumes: volumes:
- ./docker/data/sia:/sia-data - /media/sf_sia_data:/sia-data
networks: networks:
shared: shared:
ipv4_address: 192.168.0.10 ipv4_address: 10.0.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
expose: expose:
- 9980 - 9980
@ -55,6 +38,9 @@ services:
build: build:
context: ./docker/caddy context: ./docker/caddy
dockerfile: Dockerfile dockerfile: Dockerfile
image: caddy
deploy:
mode: global
container_name: caddy container_name: caddy
restart: unless-stopped restart: unless-stopped
env_file: env_file:
@ -65,7 +51,7 @@ services:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile - ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile
networks: networks:
shared: shared:
ipv4_address: 192.168.0.20 ipv4_address: 10.0.0.20
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
@ -74,6 +60,8 @@ services:
nginx: nginx:
image: openresty/openresty:1.15.8.3-2-xenial image: openresty/openresty:1.15.8.3-2-xenial
deploy:
mode: global
container_name: nginx container_name: nginx
restart: unless-stopped restart: unless-stopped
env_file: env_file:
@ -87,7 +75,7 @@ services:
- webapp:/var/www/webportal:ro - webapp:/var/www/webportal:ro
networks: networks:
shared: shared:
ipv4_address: 192.168.0.30 ipv4_address: 10.0.0.30
expose: expose:
- 80 - 80
depends_on: depends_on:
@ -99,6 +87,9 @@ services:
build: build:
context: ./packages/webapp context: ./packages/webapp
dockerfile: Dockerfile dockerfile: Dockerfile
image: webapp
deploy:
mode: global
container_name: webapp container_name: webapp
restart: unless-stopped restart: unless-stopped
tty: true tty: true
@ -109,6 +100,9 @@ services:
build: build:
context: ./docker/handshake context: ./docker/handshake
dockerfile: Dockerfile dockerfile: Dockerfile
image: handhsake
deploy:
mode: global
container_name: handshake container_name: handshake
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -122,7 +116,7 @@ services:
- ./docker/data/handshake/.hsd:/root/.hsd - ./docker/data/handshake/.hsd:/root/.hsd
networks: networks:
shared: shared:
ipv4_address: 192.168.0.40 ipv4_address: 10.0.0.40
expose: expose:
- 12037 - 12037
@ -130,6 +124,9 @@ services:
build: build:
context: ./packages/handshake-api context: ./packages/handshake-api
dockerfile: Dockerfile dockerfile: Dockerfile
image: handshake-api
deploy:
mode: global
container_name: handshake-api container_name: handshake-api
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -141,7 +138,7 @@ services:
- .env - .env
networks: networks:
shared: shared:
ipv4_address: 192.168.0.50 ipv4_address: 10.0.0.50
expose: expose:
- 3100 - 3100
depends_on: depends_on:
@ -151,13 +148,16 @@ services:
build: build:
context: ./packages/health-check context: ./packages/health-check
dockerfile: Dockerfile dockerfile: Dockerfile
image: health-check
deploy:
mode: global
container_name: health-check container_name: health-check
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./docker/data/health-check/state:/usr/app/state - ./docker/data/health-check/state:/usr/app/state
networks: networks:
shared: shared:
ipv4_address: 192.168.0.60 ipv4_address: 10.0.0.60
environment: environment:
- HOSTNAME=0.0.0.0 - HOSTNAME=0.0.0.0
- PORTAL_URL=nginx - PORTAL_URL=nginx
@ -166,3 +166,4 @@ services:
depends_on: depends_on:
- handshake - handshake
- handshake-api - handshake-api

View File

@ -8,6 +8,6 @@ ARG branch=master
RUN git clone https://gitlab.com/NebulousLabs/Sia.git --single-branch --branch ${branch} RUN git clone https://gitlab.com/NebulousLabs/Sia.git --single-branch --branch ${branch}
RUN make release --directory Sia 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/ COPY --from=sia-builder /go/bin/siac /go/bin/siad /usr/bin/

View File

@ -9,5 +9,5 @@ COPY package.json .
ENV CYPRESS_INSTALL_BINARY 0 ENV CYPRESS_INSTALL_BINARY 0
ENV GATSBY_TELEMETRY_DISABLED 1 ENV GATSBY_TELEMETRY_DISABLED 1
RUN yarn --no-lockfile RUN yarn --no-lockfile --network-timeout 100000
RUN yarn build RUN yarn build