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

ci(dockerfiles): minor improvements & rename to .dockerfile #26

Merged
merged 1 commit into from
Dec 27, 2023
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
10 changes: 5 additions & 5 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-api:${{steps.tag_name.outputs.tag}} \
--build-arg SERVER_TARGET=api \
--build-arg VERSION=${{steps.tag_name.outputs.tag}} \
Expand All @@ -44,7 +44,7 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-admin:${{steps.tag_name.outputs.tag}} \
--build-arg SERVER_TARGET=admin \
--build-arg VERSION=${{steps.tag_name.outputs.tag}} \
Expand All @@ -68,7 +68,7 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.Dockerfile \
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-engine:${{steps.tag_name.outputs.tag}} \
--build-arg SERVER_TARGET=engine \
--build-arg VERSION=${{steps.tag_name.outputs.tag}} \
Expand All @@ -92,7 +92,7 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/migrate.Dockerfile \
DOCKER_BUILDKIT=1 docker build -f ./build/package/migrate.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-migrate:${{steps.tag_name.outputs.tag}} \
.
- name: Push to GHCR
Expand All @@ -114,7 +114,7 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build
run: |
DOCKER_BUILDKIT=1 docker build -f ./build/package/frontend.Dockerfile \
DOCKER_BUILDKIT=1 docker build -f ./build/package/frontend.dockerfile \
-t ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}} \
.
- name: Push to GHCR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:18-alpine as build

WORKDIR /app
COPY ./frontend/app/package.json ./frontend/app/package-lock.json ./
RUN npm install
RUN npm ci
COPY ./frontend/app ./
RUN npm run build

Expand Down
16 changes: 0 additions & 16 deletions build/package/migrate.Dockerfile

This file was deleted.

14 changes: 14 additions & 0 deletions build/package/migrate.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Base Go environment
# -------------------
FROM golang:1.21-alpine as base
WORKDIR /hatchet

COPY go.mod go.sum ./

RUN go mod download

RUN go run github.com/steebchen/prisma-client-go prefetch

COPY /prisma ./prisma

CMD go run github.com/steebchen/prisma-client-go migrate deploy
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ RUN go run github.com/steebchen/prisma-client-go generate --generator go
FROM node:16-alpine as build-openapi
WORKDIR /openapi

RUN npm install -g npm@8.1

RUN npm install -g @apidevtools/swagger-cli prisma
RUN npm install -g npm@8.1 @apidevtools/swagger-cli prisma

COPY /api-contracts/openapi ./openapi

Expand Down
Loading