Skip to content

Commit 91c5d5a

Browse files
shyimaragon999
authored andcommitted
Add docker file and build in CI
1 parent a3a8731 commit 91c5d5a

File tree

5 files changed

+114
-8
lines changed

5 files changed

+114
-8
lines changed

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: actions/setup-go@v2
19+
with:
20+
go-version: 1.15
21+
22+
- name: Build UI
23+
run: |
24+
npm install
25+
npm run build
26+
go install github.com/go-bindata/go-bindata/...
27+
28+
- name: Login into Github Docker Registery
29+
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u shyim --password-stdin
30+
31+
- name: Run GoReleaser
32+
uses: goreleaser/goreleaser-action@v2
33+
with:
34+
version: latest
35+
args: release --rm-dist
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/bindata.go
55
/php-dump-server
66
.DS_Store
7+
/package-lock.json

.goreleaser.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
before:
2+
hooks:
3+
- go mod download
4+
- go-bindata public/ public/build
5+
6+
builds:
7+
- env:
8+
- CGO_ENABLED=0
9+
goos:
10+
- linux
11+
- windows
12+
- darwin
13+
14+
archives:
15+
- replacements:
16+
darwin: Darwin
17+
linux: Linux
18+
windows: Windows
19+
386: i386
20+
amd64: x86_64
21+
22+
release:
23+
github:
24+
owner: shyim
25+
name: php-dump-server
26+
27+
dockers:
28+
- image_templates:
29+
- "ghcr.io/shyim/php-dump-server:{{ .Tag }}"
30+
- "ghcr.io/shyim/php-dump-server:v{{ .Major }}"
31+
- "ghcr.io/shyim/php-dump-server:v{{ .Major }}.{{ .Minor }}"
32+
- "ghcr.io/shyim/php-dump-server:latest"
33+
34+
checksum:
35+
name_template: 'checksums.txt'
36+
37+
snapshot:
38+
name_template: "{{ .Tag }}-next"
39+
40+
changelog:
41+
sort: asc
42+
filters:
43+
exclude:
44+
- '^docs:'
45+
- '^test:'

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM scratch
2+
ENTRYPOINT ["/php-dump-server"]
3+
EXPOSE 9009
4+
COPY php-dump-server /

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1-
# php-dump (pd) client
1+
# PHP Dump Server
22

3-
Client for php-dump
3+
Server for the [Client](https://github.com/shyim/php-dump-client)
44

5-
## Dev Setup
5+
## Stack:
66

7-
First clone the repo then inside the directory run
8-
```
9-
yarn install
10-
yarn run dev
7+
* UI is build using Svelte
8+
* Webserver is running with Go
9+
10+
The compiled UI will be build into the Binary, so you need to start only the Binary.
11+
12+
# Installation
13+
14+
* Download the latest Version from releases or Build own see below
15+
* Run the dump server
16+
* Open Webbrowser and visit "http://localhost:9009"
17+
18+
# Building
19+
20+
```bash
21+
npm install
22+
npm run build
23+
24+
# Install go-bindata
25+
go install github.com/go-bindata/go-bindata/...
26+
27+
go-bindata public/ public/bundle/
28+
go build
1129
```
12-
After that a local webserver should start (default [localhost:5000](http://localhost:5000/)).
30+
31+
To edit the UI you can run `npm run dev` to have a Watch Server at `http://localhost:5000`. Make sure you have still running the Go Server.

0 commit comments

Comments
 (0)