Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #451 from craftcms/feature/2.0.9
Browse files Browse the repository at this point in the history
2.0.9
  • Loading branch information
jasonmccallister committed Feb 15, 2022
2 parents aef1a9f + 43da194 commit 7f2450f
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 25 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Added
- Added support for PHP 8.1.
- Added support for more Linux distributions when installing certificates. ([#380](https://github.com/craftcms/nitro/issues/380), [#414](https://github.com/craftcms/nitro/issues/414))

### Removed
- Removed the `blackfire` command.

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -2,15 +2,15 @@
FROM caddy:2.3.0-alpine AS caddy

# build the api
FROM golang:1.16-alpine AS builder
FROM golang:1.17-alpine AS builder
ARG NITRO_VERSION
ENV NITRO_VERSION=${NITRO_VERSION}
WORKDIR /go/src/github.com/craftcms/nitro
COPY . .
RUN GOOS=linux go build -ldflags="-s -w -X 'github.com/craftcms/nitro/pkg/api/api.Version=${NITRO_VERSION}'" -o nitrod ./cmd/nitrod

# build the final image
FROM alpine:3.12
FROM alpine:3

# See https://caddyserver.com/docs/conventions#file-locations for details
ENV XDG_CONFIG_HOME /config
Expand Down
4 changes: 2 additions & 2 deletions Makefile
@@ -1,6 +1,6 @@
.PHONY: docker docs

VERSION ?= 2.0.8
VERSION ?= 2.0.9

build:
go build -trimpath -ldflags="-s -w -X 'github.com/craftcms/nitro/command/version.Version=${VERSION}'" -o nitro ./cmd/nitro
Expand All @@ -20,7 +20,7 @@ build-linux-arm:
mod:
go mod tidy && go mod verify

docker:
proxy:
docker build --build-arg NITRO_VERSION=${VERSION} -t craftcms/nitro-proxy:${VERSION} .
docs:
go run cmd/docs/main.go
Expand Down
1 change: 1 addition & 0 deletions command/update/update.go
Expand Up @@ -20,6 +20,7 @@ import (

var (
DockerImages = map[string]string{
"nginx:8.1-dev": "docker.io/craftcms/nginx:8.1-dev",
"nginx:8.0-dev": "docker.io/craftcms/nginx:8.0-dev",
"nginx:7.4-dev": "docker.io/craftcms/nginx:7.4-dev",
"nginx:7.3-dev": "docker.io/craftcms/nginx:7.3-dev",
Expand Down
45 changes: 31 additions & 14 deletions go.mod
@@ -1,42 +1,59 @@
module github.com/craftcms/nitro

go 1.16
go 1.17

require (
github.com/docker/docker v20.10.1+incompatible
github.com/docker/go-connections v0.4.0
github.com/go-sql-driver/mysql v1.5.0
github.com/golang/protobuf v1.4.3
github.com/google/uuid v1.2.0
github.com/minio/selfupdate v0.3.1
github.com/mitchellh/go-homedir v1.1.0
github.com/opencontainers/image-spec v1.0.1
github.com/rodaine/table v1.0.1
github.com/spf13/cobra v1.1.1
google.golang.org/grpc v1.34.0
google.golang.org/protobuf v1.25.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/Microsoft/hcsshim v0.8.14 // indirect
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 // indirect
github.com/containerd/containerd v1.4.3 // indirect
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v20.10.1+incompatible
github.com/docker/go-connections v0.4.0
github.com/go-sql-driver/mysql v1.5.0
github.com/golang/protobuf v1.4.3
github.com/docker/go-units v0.4.0 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/google/go-cmp v0.5.2 // indirect
github.com/google/uuid v1.2.0
github.com/gorilla/mux v1.8.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/minio/selfupdate v0.3.1
github.com/mitchellh/go-homedir v1.1.0
github.com/moby/sys/mount v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.4.0 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/runc v0.1.1 // indirect
github.com/rodaine/table v1.0.1
github.com/pkg/errors v0.9.1 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5 // indirect
go.opencensus.io v0.22.0 // indirect
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 // indirect
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d // indirect
google.golang.org/grpc v1.34.0
google.golang.org/protobuf v1.25.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
gopkg.in/yaml.v2 v2.2.8 // indirect
gotest.tools/v3 v3.0.3 // indirect
)
5 changes: 3 additions & 2 deletions pkg/certinstall/certinstall_linux.go
@@ -1,4 +1,5 @@
// +build linux, !darwin
//go:build (linux && ignore) || !darwin
// +build linux,ignore !darwin

package certinstall

Expand Down Expand Up @@ -99,7 +100,7 @@ func identify(description string) (string, error) {
}

// detect debian systems
if strings.Contains(description, "Ubuntu") || strings.Contains(description, "Pop!_OS") || strings.Contains(description, "Mint") || strings.Contains(description, "elementary") || strings.Contains(description, "Debian") {
if strings.Contains(description, "Ubuntu") || strings.Contains(description, "Pop!_OS") || strings.Contains(description, "Mint") || strings.Contains(description, "elementary") || strings.Contains(description, "Debian") || strings.Contains(description, "Zorin OS") {
return "debian", nil
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/config/config.go
Expand Up @@ -783,13 +783,13 @@ func xdebugVars(php PHP, xdebug bool, version, hostname, addr string) []string {
}

switch version {
case "8.0", "7.4", "7.3", "7.2":
envs = append(envs, fmt.Sprintf(`XDEBUG_CONFIG=client_host=%s client_port=9003`, addr))
envs = append(envs, "XDEBUG_MODE=develop,debug")
default:
case "7.1", "7.0":
// use legacy xdebug settings to support older versions of php
envs = append(envs, fmt.Sprintf(`XDEBUG_CONFIG=idekey=PHPSTORM remote_host=%s profiler_enable=1 remote_port=9000 remote_autostart=1 remote_enable=1`, addr))
envs = append(envs, "XDEBUG_MODE=xdebug2")
default:
envs = append(envs, fmt.Sprintf(`XDEBUG_CONFIG=client_host=%s client_port=9003`, addr))
envs = append(envs, "XDEBUG_MODE=develop,debug")
}

return envs
Expand Down
1 change: 1 addition & 0 deletions pkg/phpversions/phpversions.go
Expand Up @@ -2,6 +2,7 @@ package phpversions

// Versions is the known PHP versions we support
var Versions = []string{
"8.1",
"8.0",
"7.4",
"7.3",
Expand Down
2 changes: 1 addition & 1 deletion pkg/validate/validate.go
Expand Up @@ -93,7 +93,7 @@ type PHPVersionValidator struct{}

func (v *PHPVersionValidator) Validate(input string) error {
switch input {
case "8.0", "7.4", "7.3", "7.2", "7.1", "7.0":
case "8.1", "8.0", "7.4", "7.3", "7.2", "7.1", "7.0":
return nil
}

Expand Down

0 comments on commit 7f2450f

Please sign in to comment.