Skip to content

Commit

Permalink
Merge pull request #16 from ZakisM/feat/use-golang-playwright
Browse files Browse the repository at this point in the history
feat: use golang for playwright
  • Loading branch information
ZakisM authored Feb 27, 2024
2 parents edbfe41 + 5110db6 commit 46bcff1
Show file tree
Hide file tree
Showing 13 changed files with 242 additions and 330 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v5.1.0
with:
context: ./playwright_bridge
context: ./playwright_bridge_go
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
175 changes: 0 additions & 175 deletions playwright_bridge/.gitignore

This file was deleted.

26 changes: 0 additions & 26 deletions playwright_bridge/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions playwright_bridge/README.md

This file was deleted.

Binary file removed playwright_bridge/bun.lockb
Binary file not shown.
71 changes: 0 additions & 71 deletions playwright_bridge/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions playwright_bridge/package.json

This file was deleted.

27 changes: 0 additions & 27 deletions playwright_bridge/tsconfig.json

This file was deleted.

13 changes: 13 additions & 0 deletions playwright_bridge_go/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:latest as builder
WORKDIR /app
COPY go.mod go.sum .
RUN go mod download
RUN go run github.com/playwright-community/playwright-go/cmd/playwright@latest install webkit
COPY *.go .
COPY playwright_helper ./playwright_helper
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/playwright-bridge-go

FROM mcr.microsoft.com/playwright:v1.41.1-jammy
COPY --from=builder /app/playwright-bridge-go ./app/
COPY --from=builder ../root/.cache/ms-playwright-go ../root/.cache/ms-playwright-go
ENTRYPOINT ["/app/playwright-bridge-go"]
27 changes: 27 additions & 0 deletions playwright_bridge_go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module main

go 1.22.0

require (
github.com/labstack/echo/v4 v4.11.4
github.com/playwright-community/playwright-go v0.4101.1
)

require (
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
)
Loading

0 comments on commit 46bcff1

Please sign in to comment.