Skip to content

Commit 50ce34b

Browse files
author
Yasuyuki Takeo
committed
Merge branch 'release/0.2'
2 parents 66cb85a + bd79d3a commit 50ce34b

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@ WORKDIR /go/app
44

55
COPY . .
66
COPY .env .
7+
COPY .realize.yaml .
78

89
RUN apk add --no-cache git \
910
&& go build -o app
1011

11-
FROM alpine:3.12.0
12+
FROM golang:1.14.9-alpine3.12
1213

1314
WORKDIR /app
1415

1516
COPY --from=build /go/app/app .
1617

17-
RUN apk add --update --no-cache go git \
18-
&& export GOPATH=/root/go \
19-
&& export PATH=${GOPATH}/bin:/usr/local/go/bin:$PATH \
20-
&& export GOBIN=$GOROOT/bin \
21-
&& mkdir -p ${GOPATH}/src ${GOPATH}/bin \
18+
RUN apk add --no-cache alpine-sdk git \
19+
&& go get -u github.com/oxequa/realize \
2220
&& addgroup go \
2321
&& adduser -D -G go go \
2422
&& chown -R go:go /app/app \
2523
&& chmod +x /app/app
2624

27-
CMD ["go", "run", "main.go"]
25+
# CMD ["go", "run", "main.go"]
26+
CMD [ "realize", "start" ]

README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,23 @@ go build *.go
4242
```
4343
COMMON_APP_ENV=
4444
```
45-
1. Start Chrome Headless Server
46-
```
47-
docker run -d -p 9222:9222 --rm --name headless-shell --shm-size 2G chromedp/headless-shell
45+
1. Run command below.
4846
```
49-
1. Run server as below. `realize` command allows Hot reloading.
50-
```shell script
51-
realize start
47+
docker-compose up
5248
```
5349
54-
## How to run all tests
55-
```
56-
go test -v -race -run=. -bench=. ./...
57-
```
58-
59-
##How to run for production
60-
1. Create `.env` based off from `.env.default`
50+
## How to run for production
51+
1. Create `.env` based off from `.env.default`. Make sure `production` is set to `COMMON_APP_ENV`.
6152
1. Set API Keys accordingly.
6253
1. Run command below.
6354
```
6455
docker-compose up
6556
```
57+
58+
## How to run all tests
59+
```
60+
go test -v -race -run=. -bench=. ./...
61+
```
6662
6763
## How to build Docker image
6864
This is how to build and confirm the image is built correctly.

0 commit comments

Comments
 (0)