Skip to content

Commit

Permalink
add chmod to executable (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistonight committed Oct 8, 2023
1 parent 55df4c0 commit 94aa615
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
workflow: build.yml
commit: ${{ github.sha }}
path: docker/dist
- run: ./make-version.sh ${{ github.event.inputs.version }} ${{ github.sha }}
- run: |
chmod +x ./make-version.sh
./make-version.sh ${{ github.event.inputs.version }} ${{ github.sha }}
working-directory: docker
- uses: docker/login-action@v3
with:
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@ to create a certificate `.pfx` file. Then use `openssl` to extract the cert and
in `/cert/cert-key.pem` and `/cert/cert.pem` (relative to repo root).

Once done, vite dev server for web-client should run in https.

## Local build
If there are issues running `task build`, try:
```
cargo clean
task build:server
task build
```
(Typically need to do this after rustup update)
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ tasks:
desc: Build production assets
deps:
- docs:build
- build:server
- build:client
- build:server

build:server:
deps:
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM alpine:latest
EXPOSE 80
ENV APP_DIR=/opt/app
COPY ./dist $APP_DIR
RUN chmod +x $APP_DIR/bin/celerserver

WORKDIR $APP_DIR

Expand Down
11 changes: 10 additions & 1 deletion docker/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ tasks:
- cp -r ../docs/src/.vitepress/dist/* dist/docs
- cp -r ../web-client/dist/* dist/app
- cp ../target/x86_64-unknown-linux-musl/release/celerserver dist/bin
- chmod +x ./make-version.sh
- ./make-version.sh 0.0.0-dev docker

build:
desc: Build docker container locally (requires building assets first)
Expand All @@ -25,7 +27,14 @@ tasks:
run:
desc: Run docker container
cmds:
- docker run -p 8000:80 pistonite/celer -e CELERSERVER_SITE_ORIGIN=http://pistonite.local
- task: run-image
vars:
IMAGE: pistonite/celer

run-image:
desc: Run docker container
cmds:
- docker run -p 8000:80 -e CELERSERVER_SITE_ORIGIN=http://pistonite.local {{.IMAGE}}

stop:
desc: Stop docker container
Expand Down
1 change: 1 addition & 0 deletions docker/make-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
VERSION=$@
echo "Version: $VERSION"
echo $VERSION > dist/VERSION
Expand Down

0 comments on commit 94aa615

Please sign in to comment.