Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use golang for playwright #16

Merged
merged 1 commit into from
Feb 27, 2024
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
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/[email protected]
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
Loading