From 10314c299790bdc7f6627be790f6c18b302214cc Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Tue, 15 Mar 2022 18:11:27 +0100 Subject: [PATCH] added backend to compose --- dev/compose.yml | 10 +++++++++- dev/containers/backend/Containerfile | 13 +++++++++++++ pkg/ui/package.json | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 dev/containers/backend/Containerfile diff --git a/dev/compose.yml b/dev/compose.yml index 39ab884..9538941 100644 --- a/dev/compose.yml +++ b/dev/compose.yml @@ -18,7 +18,15 @@ services: volumes: - ../pkg/ui:/ui ports: - - 8072:3000 + - 8040:3000 command: - start + backend: + build: + dockerfile: dev/containers/backend/Containerfile + context: ../. + volumes: + - ../.:/src/alice-lg + ports: + - 7340:7340 diff --git a/dev/containers/backend/Containerfile b/dev/containers/backend/Containerfile new file mode 100644 index 0000000..73a3a84 --- /dev/null +++ b/dev/containers/backend/Containerfile @@ -0,0 +1,13 @@ + +FROM golang:1.17 + + +WORKDIR /src/alice-lg + +ADD go.mod . +ADD go.sum . +RUN go mod download + +WORKDIR /src/alice-lg/cmd/alice-lg +CMD ["go", "run", ".", "-config", "../../etc/alice-lg/alice.conf"] + diff --git a/pkg/ui/package.json b/pkg/ui/package.json index 78c0108..e29f7a6 100644 --- a/pkg/ui/package.json +++ b/pkg/ui/package.json @@ -23,6 +23,7 @@ "react-app/jest" ] }, + "proxy": "http://backend:7340", "browserslist": { "production": [ ">0.2%",