fix docker test environment

This commit is contained in:
Cadey Ratio 2019-12-10 22:25:28 +00:00
parent 18eef713a0
commit 19cd0d7f50
2 changed files with 21 additions and 9 deletions

View File

@ -1,7 +1,10 @@
FROM xena/go:1.13.5 AS build FROM xena/go:1.13.5 AS build
WORKDIR /wasmcloud WORKDIR /wasmcloud
COPY . .
ENV GOPROXY https://cache.greedo.xeserv.us ENV GOPROXY https://cache.greedo.xeserv.us
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN GOBIN=/wasmcloud/bin go install -tags=postgres ./cmd/... RUN GOBIN=/wasmcloud/bin go install -tags=postgres ./cmd/...
FROM xena/alpine FROM xena/alpine

View File

@ -1,31 +1,34 @@
version: '3.7' version: '3.7'
services: services:
ipfs:
image: "ipfs/go-ipfs:latest"
environment:
- IPFS_PROFILE=server
volumes:
- ipfs:/data/ipfs
worker: worker:
deploy: deploy:
replicas: 3 replicas: 3
restart: always restart: always
image: xena/wasmcloud build: .
environment: environment:
- IPFS_HOST=ipfs:5001 - IPFS_HOST=ipfs:5001
- NATS_URL=nats://nats:4222 - NATS_URL=nats://nats:4222
- WORKER_COUNT=16
command: /usr/local/bin/wasmcloud-executor command: /usr/local/bin/wasmcloud-executor
depends_on:
- nats
- ipfs
web: web:
restart: always restart: always
image: xena/wasmcloud build: .
ports: ports:
- "3002:3002" - "3002:3002"
depends_on:
- nats
- postgres
- ipfs
environment: environment:
- DATABASE_KIND=postgres - DATABASE_KIND=postgres
- "DATABASE_URL=host=postgres port=5432 user=azurediamond dbname=wasmcloud password=hunter2 sslmode=disable" - "DATABASE_URL=host=postgres port=5432 user=azurediamond dbname=wasmcloud password=hunter2 sslmode=disable"
- NATS_URL=nats://nats:4222 - NATS_URL=nats://nats:4222
- IPFS_HOST=ipfs:5001 - IPFS_HOST=ipfs:5001
command: /usr/local/bin/wasmcloudd command: /usr/local/bin/wasmcloudd
postgres: postgres:
image: "postgres:alpine" image: "postgres:alpine"
environment: environment:
@ -39,6 +42,12 @@ services:
image: "nats:latest" image: "nats:latest"
ports: ports:
- 8222:8222 - 8222:8222
ipfs:
image: "ipfs/go-ipfs:latest"
environment:
- IPFS_PROFILE=server
volumes:
- ipfs:/data/ipfs
volumes: volumes:
ipfs: ipfs: