mirror of
https://github.com/alice-lg/alice-lg.git
synced 2024-05-11 05:55:03 +00:00
Merge branch 'master' into develop
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -31,18 +31,12 @@ ADD go.mod .
|
||||
ADD go.sum .
|
||||
RUN go mod download
|
||||
|
||||
ADD . .
|
||||
|
||||
# Add client
|
||||
COPY --from=frontend /src/alice-lg/client/build client/build
|
||||
|
||||
# Build backend
|
||||
WORKDIR /src/alice-lg
|
||||
ADD VERSION .
|
||||
ADD go.mod go.sum .
|
||||
|
||||
WORKDIR /src/alice-lg/cmd/alice-lg
|
||||
ADD backend .
|
||||
|
||||
# RUN go build -o alice-lg-linux-amd64 -ldflags="-X main.version=4.0.3"
|
||||
RUN make alpine
|
||||
|
||||
FROM alpine:latest
|
||||
|
13
Makefile
13
Makefile
@ -36,19 +36,16 @@ client_prod:
|
||||
$(MAKE) -C client/ client_prod
|
||||
|
||||
backend_dev: client_dev
|
||||
$(MAKE) -C backend/
|
||||
$(MAKE) -C cmd/alice-lg/
|
||||
|
||||
dev:
|
||||
$(MAKE) -C backend/ osx-dev
|
||||
|
||||
$(MAKE) -C cmd/alice-lg/ osx-dev
|
||||
|
||||
backend_prod: client_prod
|
||||
$(MAKE) -C backend/ bundle
|
||||
$(MAKE) -C backend/ linux
|
||||
$(MAKE) -C cmd/alice-lg/
|
||||
|
||||
|
||||
alice: client_prod backend_prod
|
||||
mv backend/alice-lg-* bin/
|
||||
alice: backend_prod
|
||||
cp cmd/alice-lg/alice-lg-* bin/
|
||||
|
||||
|
||||
dist: clean alice
|
||||
|
@ -1,7 +1,8 @@
|
||||
|
||||
DOCKER := docker
|
||||
DOCKER_CONTAINER := alice-lg-node-build
|
||||
DOCKER_IMAGE := alice-lg-node:latest
|
||||
DOCKER_EXEC := docker run --rm -t -i \
|
||||
DOCKER_EXEC := $(DOCKER) run --rm -t -i \
|
||||
-a stdin -a stdout -a stderr \
|
||||
-v `pwd`:/client/ \
|
||||
--name $(DOCKER_CONTAINER) \
|
||||
@ -11,7 +12,7 @@ all: client
|
||||
@echo "Built alice-lg client"
|
||||
|
||||
image:
|
||||
docker build . -t $(DOCKER_IMAGE)
|
||||
$(DOCKER) build . -t $(DOCKER_IMAGE)
|
||||
|
||||
deps: image
|
||||
$(DOCKER_EXEC) "yarn install"
|
||||
@ -29,12 +30,12 @@ watch:
|
||||
|
||||
stop:
|
||||
@echo "Stopping docker container: $(DOCKER_CONTAINER)"
|
||||
-docker stop $(DOCKER_CONTAINER)
|
||||
-$(DOCKER) stop $(DOCKER_CONTAINER)
|
||||
@sleep 1
|
||||
|
||||
kill:
|
||||
@echo "Killing docker container: $(DOCKER_CONTAINER)"
|
||||
-docker kill $(DOCKER_CONTAINER)
|
||||
-$(DOCKER) kill $(DOCKER_CONTAINER)
|
||||
@sleep 1
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user