Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Files
**/.DS_Store
.dockerignore
.editorconfig
.gitattributes
.gitignore
Dockerfile
LICENSE
**/*_test.go
*.yml
*.md
*.out

# Folders
.git/
.github/
.task/
app/
tmp/
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
# Tests
*.out
**/tmp/

# Embed file
**/blob.go
27 changes: 26 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
project_name: cgapp
env_files:
github_token: ~/.goreleaser/github_token

before:
hooks:
- go mod download
- go generate ./...

builds:
- # Build macOS, Linux and Windows versions
goos:
Expand All @@ -19,6 +21,26 @@ builds:
- windows_amd64
env:
- CGO_ENABLED=0

dockers:
# You can have multiple Docker images.
- # GOOS of the built binary that should be used.
goos: linux
goarch: amd64

# Name templates of the built binaries that should be used.
binaries:
- cgapp

# Templates of the Docker image names.
image_templates:
- "koddr/cgapp:v{{ .Major }}"
- "koddr/cgapp:{{ .Tag }}"
- "koddr/cgapp:latest"

# Path to the Dockerfile (from the project root).
dockerfile: Dockerfile

archives:
- # Replacements for GOOS and GOARCH in the archive name.
replacements:
Expand All @@ -27,7 +49,7 @@ archives:
windows: Windows
amd64: x86_64

# Can be used to change the archive formats for specific GOOSs.
# Can be used to change the archive formats for specific GOOS.
format_overrides:
- goos: windows
format: zip
Expand All @@ -36,10 +58,13 @@ archives:
files:
- LICENSE
- README.md

checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{.Tag}}"

changelog:
sort: asc
filters:
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM alpine:3.12

LABEL maintainer="Vic Shóstak <truewebartisans@gmail.com>"

# Copy Create Go App binary
COPY cgapp /cgapp

# Install git
RUN apk add --no-cache git npm

# Install frontend CLIs
RUN npm i -g -s create-react-app preact-cli @vue/cli degit @angular/cli

# Set entry point to /cgapp
ENTRYPOINT ["/cgapp"]
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</h1>
<p align="center">Create a new production-ready project with <b>backend</b> (Golang), <b>frontend</b> (JavaScript, TypeScript)<br/>and <b>deploy automation</b> (Ansible, Docker) by running one CLI command.<br/><br/>Focus on <b>writing</b> code and <b>thinking</b> of business-logic! The CLI will take care of the rest.</p>

<p align="center"><a href="https://github.com/create-go-app/cli/releases" target="_blank"><img src="https://img.shields.io/badge/version-v1.4.0-blue?style=for-the-badge&logo=none" alt="cli version" /></a>&nbsp;<a href="https://pkg.go.dev/github.com/create-go-app/cli?tab=doc" target="_blank"><img src="https://img.shields.io/badge/Go-1.11+-00ADD8?style=for-the-badge&logo=go" alt="go version" /></a>&nbsp;<a href="https://gocover.io/github.com/create-go-app/cli/pkg/cgapp" target="_blank"><img src="https://img.shields.io/badge/Go_Cover-94%25-success?style=for-the-badge&logo=none" alt="go cover" /></a>&nbsp;<a href="https://goreportcard.com/report/github.com/create-go-app/cli" target="_blank"><img src="https://img.shields.io/badge/Go_report-A+-success?style=for-the-badge&logo=none" alt="go report" /></a>&nbsp;<img src="https://img.shields.io/badge/license-apache_2.0-red?style=for-the-badge&logo=none" alt="license" /></p>
<p align="center"><a href="https://github.com/create-go-app/cli/releases" target="_blank"><img src="https://img.shields.io/badge/version-v1.4.1-blue?style=for-the-badge&logo=none" alt="cli version" /></a>&nbsp;<a href="https://pkg.go.dev/github.com/create-go-app/cli?tab=doc" target="_blank"><img src="https://img.shields.io/badge/Go-1.11+-00ADD8?style=for-the-badge&logo=go" alt="go version" /></a>&nbsp;<a href="https://gocover.io/github.com/create-go-app/cli/pkg/cgapp" target="_blank"><img src="https://img.shields.io/badge/Go_Cover-94%25-success?style=for-the-badge&logo=none" alt="go cover" /></a>&nbsp;<a href="https://goreportcard.com/report/github.com/create-go-app/cli" target="_blank"><img src="https://img.shields.io/badge/Go_report-A+-success?style=for-the-badge&logo=none" alt="go report" /></a>&nbsp;<img src="https://img.shields.io/badge/license-apache_2.0-red?style=for-the-badge&logo=none" alt="license" /></p>

## ⚡️ [Quick start](https://create-go.app/quick-start/)

Expand All @@ -28,6 +28,16 @@ Okay, it works! Now, you can run this project on your **local machine** or deplo
cgapp deploy
```

### ~ Docker-way to quick start

If you don't want to install Create Go App CLI to your system, you feel free to using our official [Docker image](https://hub.docker.com/r/koddr/cgapp) and run CLI from isolated container:

```bash
docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/cgapp:latest
```

> ☝️ Also, with this Docker image, you do **not** have to worry about installing tools/CLI of frontend UI libraries/frameworks. Everything is **already included** to this Docker image: `create-react-app`, `preact-cli`, `vue-cli`, `ng-cli` and `degit` (for Svelte).

That's all you need to start! 🎉

## 📖 [Official Documentation](https://create-go.app/)
Expand Down
8 changes: 7 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ tasks:
- task: generate
- go build -i -o $GOPATH/bin/cgapp ./*.go

docker-image:
desc: Build Docker image with full features
cmds:
- task: build
- docker build . -t koddr/cgapp

release:
desc: GitHub release for CLI
cmds:
Expand All @@ -57,4 +63,4 @@ tasks:
update-pkg-cache:
desc: Update pkg.go.dev cache for a new version
cmds:
- GOPROXY=https://proxy.golang.org GO111MODULE=on go get github.com/create-go-app/cli@{{.VERSION}}
- curl -i https://proxy.golang.org/github.com/create-go-app/cli/@v/{{.VERSION}}.info
12 changes: 12 additions & 0 deletions pkg/embed/blob.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/registry/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import "github.com/AlecAivazis/survey/v2"

const (
// CLIVersion version of Create Go App CLI.
CLIVersion = "1.4.0"
CLIVersion = "1.4.1"
// RegexpAnsiblePattern pattern for Ansible roles.
RegexpAnsiblePattern = "^(deploy)$"
// RegexpBackendPattern pattern for backend.
Expand Down