Skip to content

Commit

Permalink
Next update: v1.2 #107
Browse files Browse the repository at this point in the history
  • Loading branch information
egorsmkv committed Aug 20, 2024
1 parent b00c4b2 commit 5293cba
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 23 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
> It must:
> - be on the latest version of Laravel
> - be lightweight to run with Docker
> - use modern technologies such as **PHP 8.3**, **Go 1.22**, **Python 3.12**, etc.
> - use modern technologies such as **PHP 8.3**, **Go 1.23**, **Python 3.12**, etc.
### Requirements

- [Moby](https://github.com/moby/moby) 26.x
- [Moby](https://github.com/moby/moby) 27.x
- [Task](https://taskfile.dev) 3.x
- [Bun](https://bun.sh) 1.x

Expand Down
28 changes: 14 additions & 14 deletions apps/go-hello/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
FROM golang:1.22.5-alpine3.20 AS build
FROM golang:1.23.0-alpine3.20 AS build

WORKDIR /app

COPY go.mod go.sum ./

ENV CGO_ENABLED=1 GOOS=linux

RUN apk update \
&& apk add --no-cache ca-certificates \
git \
build-base \
gcc \
g++ \
pkgconfig \
linux-headers \
zeromq \
zeromq-dev \
ENV CGO_ENABLED=1
ENV GOOS=linux

RUN apk update && apk add --no-cache \
ca-certificates=20240705-r0 \
git=2.45.2-r0 \
build-base=0.5-r3 \
gcc=13.2.1_git20240309-r0 \
g++=13.2.1_git20240309-r0 \
linux-headers=6.6-r0 \
zeromq=4.3.5-r2 \
zeromq-dev=4.3.5-r2 \
&& rm -rf /var/cache/apk/*

RUN go mod download && go mod verify
Expand All @@ -29,7 +29,7 @@ FROM alpine:3.20

WORKDIR /app

RUN apk add --no-cache zeromq
RUN apk add --no-cache zeromq=4.3.5-r2

COPY --from=build /app/server .

Expand Down
9 changes: 7 additions & 2 deletions apps/go-hello/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Go sample application

## Build the image
### Usage

```bash
docker build --tag go_hello:1.0 .
# Build image
task build

# Linting
task lint-dockerfile
task lint-yaml
```
2 changes: 1 addition & 1 deletion apps/go-hello/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/egorsmkv/laravel-boilerplate/apps/go-hello

go 1.22.5
go 1.23.0

require github.com/pebbe/zmq4 v1.2.11
14 changes: 14 additions & 0 deletions apps/go-hello/taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

tasks:
build:
cmds:
- docker build --tag go_hello:1.0 .

lint-dockerfile:
cmds:
- docker run --rm -i hadolint/hadolint < Dockerfile

lint-yaml:
cmds:
- yamllint -d relaxed taskfile.yml
4 changes: 2 additions & 2 deletions apps/python-hello/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM python:3.12-slim

RUN pip install --no-cache-dir pyzmq

WORKDIR /app

COPY . .

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 5555

CMD ["python", "/app/server.py"]
9 changes: 7 additions & 2 deletions apps/python-hello/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Python sample application

## Build the image
### Usage

```bash
docker build --tag python_hello:1.0 .
# Build image
task build

# Linting
task lint-dockerfile
task lint-yaml
```
1 change: 1 addition & 0 deletions apps/python-hello/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyzmq==26.1.1
14 changes: 14 additions & 0 deletions apps/python-hello/taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

tasks:
build:
cmds:
- docker build --tag python_hello:1.0 .

lint-dockerfile:
cmds:
- docker run --rm -i hadolint/hadolint < Dockerfile

lint-yaml:
cmds:
- yamllint -d relaxed taskfile.yml

0 comments on commit 5293cba

Please sign in to comment.