From 4fc9f22e31c4dee1392bc80b6d86323144a2f9ce Mon Sep 17 00:00:00 2001 From: maamokun Date: Tue, 23 Jul 2024 11:27:17 +0900 Subject: [PATCH] remove fly, coolify is king --- .github/workflows/fly-deploy.yml | 19 ----------- Dockerfile | 54 -------------------------------- fly.toml | 21 ------------- next.config.js | 9 ------ 4 files changed, 103 deletions(-) delete mode 100644 .github/workflows/fly-deploy.yml delete mode 100644 Dockerfile delete mode 100644 fly.toml diff --git a/.github/workflows/fly-deploy.yml b/.github/workflows/fly-deploy.yml deleted file mode 100644 index 555352b..0000000 --- a/.github/workflows/fly-deploy.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Fly Deploy -on: - push: - branches: - - main -jobs: - deploy: - name: Deploy app - runs-on: ubuntu-latest - concurrency: deploy-group - steps: - - uses: actions/checkout@v4 - - - uses: superfly/flyctl-actions/setup-flyctl@master - - - name: Deploy to Fly.io - run: flyctl deploy --remote-only --build-secret GH_NPM_TOKEN=${{ secrets.GH_NPM_TOKEN }} - env: - FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c12334d..0000000 --- a/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -# syntax = docker/dockerfile:1 - -# Adjust BUN_VERSION as desired -ARG BUN_VERSION=1.1.20 -FROM oven/bun:${BUN_VERSION}-slim as base - -LABEL fly_launch_runtime="Next.js" - -# Next.js app lives here -WORKDIR /app - -# Set production environment -ENV NODE_ENV="production" - -# Throw-away build stage to reduce size of final image -FROM base as build - -# Install packages needed to build node modules -RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3 - -# Mount the GH_NPM_TOKEN secret and use it to create bunfig.toml -RUN --mount=type=secret,id=GH_NPM_TOKEN \ - echo '[install.scopes]' > bunfig.toml && \ - echo 'neodyland = { token = "'$(cat /run/secrets/GH_NPM_TOKEN)'", url = "https://npm.pkg.github.com/" }' >> bunfig.toml - -# Install node modules -COPY --link bun.lockb package.json ./ -RUN bun install - -# Copy application code -COPY --link . . - -# Build application -RUN bun run build - -# Remove development dependencies -RUN rm -rf node_modules && \ - bun install --ci - -# Remove bunfig.toml to avoid token leakage -RUN rm -f bunfig.toml - -# Final stage for app image -FROM base - -# Copy built application -COPY --from=build /app/.next/standalone /app -COPY --from=build /app/.next/static /app/.next/static -COPY --from=build /app/public /app/public - -# Start the server by default, this can be overwritten at runtime -EXPOSE 3000 -CMD [ "bun", "server.js" ] \ No newline at end of file diff --git a/fly.toml b/fly.toml deleted file mode 100644 index f0cf107..0000000 --- a/fly.toml +++ /dev/null @@ -1,21 +0,0 @@ -# fly.toml app configuration file generated for mikn-dev on 2024-07-23T09:24:25+09:00 -# -# See https://fly.io/docs/reference/configuration/ for information about how to use this file. -# - -app = 'mikn-dev' -primary_region = 'nrt' - -[build] - -[http_service] - internal_port = 3000 - force_https = true - auto_stop_machines = 'stop' - auto_start_machines = true - min_machines_running = 0 - processes = ['app'] - -[[vm]] - size = 'shared-cpu-1x' - memory = '1gb' diff --git a/next.config.js b/next.config.js index 7a8ab25..155cb6d 100644 --- a/next.config.js +++ b/next.config.js @@ -26,15 +26,6 @@ const nextConfig = { }, ], }, - async redirects() { - return [ - { - source: '/account', - destination: 'https://my.mikandev.com/', - permanent: true, - }, - ] - } }; module.exports = nextConfig;