move main.go to /cmd/api and Dockerfile to /build/api
This commit is contained in:
parent
1e2e6efd0b
commit
f130e120fb
|
@ -43,5 +43,5 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
${{ secrets.REGISTRY_NAME }}/twhelp-api:latest
|
${{ secrets.REGISTRY_NAME }}/twhelp-api:latest
|
||||||
${{ secrets.REGISTRY_NAME }}/twhelp-api:${{ steps.get_version.outputs.VERSION }}
|
${{ secrets.REGISTRY_NAME }}/twhelp-api:${{ steps.get_version.outputs.VERSION }}
|
||||||
file: ./Dockerfile
|
file: ./build/server/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
|
|
13
README.md
13
README.md
|
@ -133,19 +133,10 @@ LOG_DB_QUERIES=true
|
||||||
DISABLE_ACCESS_LOG=false
|
DISABLE_ACCESS_LOG=false
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Clone this repo.
|
1. Clone this repo - ``git clone git@github.com:tribalwarshelp/api.git``
|
||||||
|
|
||||||
```
|
|
||||||
git clone git@github.com:tribalwarshelp/api.git
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Open the folder with this project in a terminal.
|
2. Open the folder with this project in a terminal.
|
||||||
3. Set the required env variables directly in your system or create .env.local file.
|
3. Set the required env variables directly in your system or create .env.local file.
|
||||||
4. Run the app.
|
4. Run the app - ``go run ./cmd/api/main.go``
|
||||||
|
|
||||||
```
|
|
||||||
go run main.go
|
|
||||||
```
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ ARG VERSION="0.0.0"
|
||||||
RUN apk --no-cache add musl-dev gcc build-base
|
RUN apk --no-cache add musl-dev gcc build-base
|
||||||
RUN go install github.com/99designs/gqlgen@v0.14.0
|
RUN go install github.com/99designs/gqlgen@v0.14.0
|
||||||
RUN go generate ./...
|
RUN go generate ./...
|
||||||
RUN go build -ldflags="-X 'main.Version=$VERSION'" -o twhelpapi .
|
RUN go build -ldflags="-X 'main.Version=$VERSION'" -o twhelpapi ./cmd/api
|
||||||
|
|
||||||
######## Start a new stage from scratch #######
|
######## Start a new stage from scratch #######
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
Reference in New Issue