feat(build): split up CLI and server images, fix bundle
This commit is contained in:
parent
0ed86e106c
commit
6de7a5a9fc
|
@ -33,7 +33,7 @@ build-node:
|
|||
- out/cache/
|
||||
- out/tmp/
|
||||
|
||||
build-image-stretch-branch:
|
||||
build-image-cli-branch:
|
||||
stage: image
|
||||
extends: [.build-docker]
|
||||
except:
|
||||
|
@ -41,9 +41,9 @@ build-image-stretch-branch:
|
|||
script:
|
||||
- ./scripts/docker-build.sh --push
|
||||
variables:
|
||||
IMAGE_ARCH: stretch
|
||||
IMAGE_ARCH: cli
|
||||
|
||||
build-image-stretch-tag:
|
||||
build-image-cli-tag:
|
||||
stage: image
|
||||
extends:
|
||||
- .build-docker
|
||||
|
@ -52,7 +52,28 @@ build-image-stretch-tag:
|
|||
script:
|
||||
- ./scripts/docker-build.sh --push
|
||||
variables:
|
||||
IMAGE_ARCH: stretch
|
||||
IMAGE_ARCH: cli
|
||||
|
||||
build-image-server-branch:
|
||||
stage: image
|
||||
extends: [.build-docker]
|
||||
except:
|
||||
- tags
|
||||
script:
|
||||
- ./scripts/docker-build.sh --push
|
||||
variables:
|
||||
IMAGE_ARCH: server
|
||||
|
||||
build-image-server-tag:
|
||||
stage: image
|
||||
extends:
|
||||
- .build-docker
|
||||
only:
|
||||
- tags
|
||||
script:
|
||||
- ./scripts/docker-build.sh --push
|
||||
variables:
|
||||
IMAGE_ARCH: server
|
||||
|
||||
# publish jobs
|
||||
publish-npm:
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
FROM docker.io/nginx:1.22
|
||||
|
||||
COPY ./out/index.html /usr/share/nginx/html
|
||||
COPY ./out/bundle /usr/share/nginx/html/bundle
|
7
Makefile
7
Makefile
|
@ -32,8 +32,11 @@ GRAPH_LAYOUT ?= dot
|
|||
graph: ## render any debug graphs
|
||||
cat out/debug-graph | $(GRAPH_LAYOUT) -Tpng -oout/debug-graph.png && sensible-browser out/debug-graph.png
|
||||
|
||||
image: ## build the docker image
|
||||
docker build $(DOCKER_ARGS) -f Dockerfile -t $(DOCKER_IMAGE) .
|
||||
image-cli: ## build the CLI image
|
||||
docker build $(DOCKER_ARGS) -f Dockerfile.cli -t $(DOCKER_IMAGE) .
|
||||
|
||||
image-server: ## build the nginx server image
|
||||
docker build $(DOCKER_ARGS) -f Dockerfile.server -t $(DOCKER_IMAGE) .
|
||||
|
||||
install:
|
||||
yarn
|
||||
|
|
|
@ -40,12 +40,12 @@ build({
|
|||
resourceRegExp: /module\/NodeModule/,
|
||||
contextRegExp: /./,
|
||||
}, {
|
||||
resourceRegExp: /index/,
|
||||
resourceRegExp: /cli/,
|
||||
contextRegExp: /./,
|
||||
}]),
|
||||
alias({
|
||||
'yargs-parser': join(root, 'node_modules/yargs-parser/browser.js'),
|
||||
'./util/config/file': join(root, 'out/src/util/config/page.js'),
|
||||
'./util/config/file.js': join(root, 'out/src/util/config/page.js'),
|
||||
}),
|
||||
],
|
||||
}).catch(() => process.exit(1));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "text-adventure",
|
||||
"name": "textual-engine",
|
||||
"version": "1.4.0",
|
||||
"main": "index.js",
|
||||
"main": "out/src/cli.js",
|
||||
"type": "module",
|
||||
"author": "ssube <seansube@gmail.com>",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Reference in New Issue