Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,18 @@ dc-stack-build:
docker compose --file docker-compose.cosmo.yml up --build --remove-orphans --detach

full-demo-up:
cd demo && find . -type d -depth 1 -not -iname otel -exec cp -fr otel {} \;
docker compose -f docker-compose.full.yml --profile default up --build --remove-orphans --detach

full-demo-down:
cd demo && find . -type d -depth 1 -not -iname otel -exec rm -fr {}/otel \;
docker compose -f docker-compose.full.yml --profile default --profile router --profile subgraphs down --remove-orphans -v

dc-federation-demo:
docker compose -f docker-compose.full.yml --profile default --profile router --profile subgraphs up --remove-orphans --detach

dc-subgraphs-demo:
cd demo && find . -type d -depth 1 -not -iname otel -exec cp -fr otel {} \;
docker compose -f docker-compose.full.yml --profile subgraphs up --remove-orphans --detach

dc-subgraphs-demo-down:
cd demo && find . -type d -depth 1 -not -iname otel -exec rm -fr {}/otel \;
docker compose -f docker-compose.full.yml --profile subgraphs down --remove-orphans

docker-build-local:
Expand Down
6 changes: 3 additions & 3 deletions demo/employees/Dockerfile → demo/Dockerfile.employees
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM golang:1.20
FROM golang:1.20 as builder

WORKDIR /app

COPY go.mod go.sum ./
COPY employees/go.mod employees/go.sum ./

RUN mkdir ../otel
COPY otel ../otel/

RUN go mod download && go mod verify

COPY . .
COPY employees .

RUN go build -o server

Expand Down
4 changes: 2 additions & 2 deletions demo/family/Dockerfile → demo/Dockerfile.family
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM golang:1.20 as builder

WORKDIR /app

COPY go.mod go.sum ./
COPY family/go.mod family/go.sum ./

RUN mkdir ../otel
COPY otel ../otel/

RUN go mod download && go mod verify

COPY . .
COPY family .

RUN go build -o server

Expand Down
4 changes: 2 additions & 2 deletions demo/hobbies/Dockerfile → demo/Dockerfile.hobbies
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ FROM golang:1.20 as builder

WORKDIR /app

COPY go.mod go.sum ./
COPY hobbies/go.mod hobbies/go.sum ./

RUN mkdir ../otel
COPY otel ../otel/

RUN go mod download && go mod verify

COPY . .
COPY hobbies .

RUN go build -o server

Expand Down
5 changes: 2 additions & 3 deletions demo/products/Dockerfile → demo/Dockerfile.products
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ FROM golang:1.20 as builder

WORKDIR /app

COPY go.mod go.sum ./
COPY products/go.mod products/go.sum ./

RUN mkdir ../otel
COPY otel ../otel/

RUN go mod download && go mod verify

COPY . .
COPY otel ..
COPY products .

RUN go build -o server

Expand Down
1 change: 0 additions & 1 deletion demo/employees/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/employees
/otel
1 change: 0 additions & 1 deletion demo/family/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/family
/otel
2 changes: 1 addition & 1 deletion demo/otel/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/wundergraph/comso/demo/otel
module github.com/wundergraph/cosmo/demo/otel

go 1.20

Expand Down
1 change: 0 additions & 1 deletion demo/products/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/products
/otel
16 changes: 12 additions & 4 deletions docker-compose.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,36 @@ services:
# Services for the demo
employees:
container_name: employees
build: ./demo/employees
build:
context: ./demo
dockerfile: Dockerfile.employees
profiles:
- subgraphs
ports:
- '4001:4001'
family:
container_name: family
build: ./demo/family
build:
context: ./demo
dockerfile: Dockerfile.family
profiles:
- subgraphs
ports:
- '4002:4002'
hobbies:
container_name: hobbies
build: ./demo/hobbies
build:
context: ./demo
dockerfile: Dockerfile.hobbies
profiles:
- subgraphs
ports:
- '4003:4003'
products:
container_name: products
build: ./demo/products
build:
context: ./demo
dockerfile: Dockerfile.products
profiles:
- subgraphs
ports:
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-docker-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ pnpm wgc subgraph create family --label team=A env=production --routing-url http
pnpm wgc subgraph create hobbies --label team=B env=production --routing-url http://hobbies:4003/graphql
pnpm wgc subgraph create products --label team=B env=production --routing-url http://products:4004/graphql

./update-docker-demo.sh
sh ../scripts/update-docker-demo.sh
Comment thread
fiam marked this conversation as resolved.
Outdated

pnpm wgc federated-graph create-token production --name mytoken
pnpm wgc federated-graph create-token production --name mytoken
4 changes: 2 additions & 2 deletions scripts/create-local-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ pnpm wgc subgraph create family --label team=A env=production --routing-url http
pnpm wgc subgraph create hobbies --label team=B env=production --routing-url http://localhost:4003/graphql
pnpm wgc subgraph create products --label team=B env=production --routing-url http://localhost:4004/graphql

./update-local-demo.sh
sh ../scripts/update-local-demo.sh

pnpm wgc federated-graph create-token production --name mytoken
pnpm wgc federated-graph create-token production --name mytoken