Skip to content

Commit aae0917

Browse files
committed
fix: migrations in docker
1 parent 7a17d1e commit aae0917

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
path: |
3939
~/go/pkg/mod
4040
~/.cache/go-build
41-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
41+
key: ${{ runner.os }}-go-${{ hashFiles('backend/go.sum') }}
4242
restore-keys: |
4343
${{ runner.os }}-go-
4444

Dockerfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ WORKDIR /app/ui
1313
# Copy package files
1414
COPY ui/package.json ui/bun.lock ./
1515

16-
# Install dependencies
17-
RUN bun install --frozen-lockfile
16+
# Install dependencies with cache mount
17+
RUN --mount=type=cache,target=/root/.bun/install/cache \
18+
bun install --frozen-lockfile
1819

1920
# Copy frontend source
2021
COPY ui/ ./
@@ -38,8 +39,9 @@ RUN apk add --no-cache git
3839
# Copy go mod files
3940
COPY backend/go.mod backend/go.sum ./
4041

41-
# Download dependencies
42-
RUN go mod download
42+
# Download dependencies with cache mount
43+
RUN --mount=type=cache,target=/go/pkg/mod \
44+
go mod download
4345

4446
# Copy backend source
4547
COPY backend/ ./
@@ -70,6 +72,9 @@ COPY --from=backend-builder /app/server ./server
7072
# Copy frontend dist from builder
7173
COPY --from=frontend-builder /app/ui/dist ./ui/dist
7274

75+
# Copy migrations directory from builder
76+
COPY --from=backend-builder /app/migrations ./migrations
77+
7378
# Copy entrypoint script
7479
COPY backend/docker-entrypoint.sh /entrypoint.sh
7580

0 commit comments

Comments
 (0)