Skip to content

Commit

Permalink
docs: complete/modify readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kperreau committed Apr 18, 2024
1 parent 2d01a6f commit 648940e
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,35 @@ Configuring GOAC is straightforward. You need to create a `.goacproject.yaml` fi
```yaml
# .goacproject.yaml

version: 1.0 # Please do not change this, keep it at 1.0
name: goac # The name of your project/service/application
target: # Currently, GOAC supports two targets: build, build-image
build: # Create the Go binary
version: 1.0 # Please do not modify this value; keep it set to 1.0
name: goac # Specify the name of your project, service, or application here
target: # GOAC currently supports two targets: 'build' and 'build-image'
build: # This target compiles the Go binary
exec:
cmd: go # The command to execute for compilation, 'go' in this case
params: # Parameters to add, the path and filename are automatically appended, the final command here will be: go build -ldflags="-s -w" -o . goac
cmd: go # The command to execute for compilation; 'go' in this case
params: # Parameters to be added; the final command will be: go build -ldflags="-s -w" -o ./goac goac
- build
- -ldflags=-s -w
- -o
build-image:
- "{{project-path}}/{{project-name}}"
- "{{project-path}}"
build-image: # This target builds the Docker image
envs:
- key: PROJECT_PATH
value: "{{project-path}}"
exec:
cmd: docker
params:
- buildx
- build
- --platform=linux/amd64,linux/arm64
- --network
- host
cmd: ./_scripts/build-image.sh # Shell script to execute for building the image
```

To see what the script that builds the image of this project looks like, take a look at this example: [build-image.sh](./_scripts/build-image.sh)

### Variables
The configuration file interprets variables that will automatically be replaced by their values.

Currently, there are two:
```
{{project-name}} # The name of the project
{{project-path}} # The path of the project
```

### Environnement
Expand Down

0 comments on commit 648940e

Please sign in to comment.