Skip to content

Commit

Permalink
Fix Docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfredericks committed Jun 22, 2024
1 parent dc1ebfc commit 7269b44
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
dockerfile: prod.Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
Expand Down
10 changes: 7 additions & 3 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
services:
pocketmine-tools:
build:
context: .
dockerfile: prod.Dockerfile
image: ghcr.io/nathanfredericks/pocketmine-tools:main
environment:
- NEXT_PUBLIC_SITE_HOST=
- NEXT_PUBLIC_SITE_PORT=
- NEXT_PUBLIC_SITE_PROTOCOL=
- NEXT_PUBLIC_POGGIT_SEARCH_API_KEY=
- NEXT_PUBLIC_CONTACT_EMAIL=
restart: unless-stopped
ports:
- 3000:3000
Expand Down
2 changes: 1 addition & 1 deletion dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ COPY . .

ENV NEXT_TELEMETRY_DISABLED 1

CMD ["npm", "run", "dev"]
CMD npm run dev
6 changes: 1 addition & 5 deletions prod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM node:20-alpine

RUN apk --no-cache add curl

WORKDIR /app

COPY package*.json .
Expand All @@ -11,6 +9,4 @@ COPY . .

ENV NEXT_TELEMETRY_DISABLED 1

RUN npm run build

CMD npm start
CMD npm run build && npm start

0 comments on commit 7269b44

Please sign in to comment.