📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
Remove fly.io related stuff
Blue Mouse934d8e7f5a1f
diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.ymldeleted file mode 100644index 9749159ff..000000000--- a/.github/workflows/fly.yml+++ /dev/null@@ -1,22 +0,0 @@-name: Fly Deploy--on:- workflow_dispatch:- # push:- # branches:- # - main- # paths:- # - "web/**"--jobs:- deploy:- name: Deploy app- runs-on: ubuntu-latest- timeout-minutes: 10- steps:- - uses: actions/checkout@v3- - uses: superfly/flyctl-actions/setup-flyctl@master- - run: flyctl deploy --remote-only- working-directory: web- env:- FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}diff --git a/web/Dockerfile.fly b/web/Dockerfile.flydeleted file mode 100644index 5f3e8bf75..000000000--- a/web/Dockerfile.fly+++ /dev/null@@ -1,50 +0,0 @@-# base node image-FROM node:24-alpine as base--# Install all node_modules, including dev dependencies-FROM base as deps--RUN mkdir /app-WORKDIR /app--ADD package.json ./-RUN npm install --production=false--# Setup production node_modules-FROM base as production-deps--RUN mkdir /app-WORKDIR /app--COPY --from=deps /app/node_modules /app/node_modules-ADD package.json ./-RUN npm prune --production--# Build the app-FROM base as build--ENV NODE_ENV=production--RUN mkdir /app-WORKDIR /app--COPY --from=deps /app/node_modules /app/node_modules--ADD . .-RUN npm run build--# Finally, build the production image with minimal footprint-FROM base--ENV NODE_ENV=production--RUN mkdir /app-WORKDIR /app--COPY --from=production-deps /app/node_modules /app/node_modules--COPY --from=build /app/build /app/build-COPY --from=build /app/public /app/public-ADD . .--CMD ["npm", "run", "start"]diff --git a/web/fly.toml b/web/fly.tomldeleted file mode 100644index f46aa8489..000000000--- a/web/fly.toml+++ /dev/null@@ -1,44 +0,0 @@-# See https://fly.io/docs/reference/configuration/ for information about how to use this file.--app = 'swetrix'-primary_region = 'lhr'-kill_signal = 'SIGINT'-kill_timeout = '5s'--[experimental]- auto_rollback = true--[build]- dockerfile = 'Dockerfile.fly'--[env]- PORT = '8080'--[[services]]- protocol = 'tcp'- internal_port = 8080- processes = ['app']--[[services.ports]]- port = 80- handlers = ['http']- force_https = true--[[services.ports]]- port = 443- handlers = ['tls', 'http']-- [services.concurrency]- type = 'connections'- hard_limit = 25- soft_limit = 20--[[services.tcp_checks]]- interval = '15s'- timeout = '2s'- grace_period = '1s'--[[vm]]- memory = '512mb'- cpu_kind = 'shared'- cpus = 1diff --git a/web/fly_import_env.cjs b/web/fly_import_env.cjsdeleted file mode 100644index de39ec5e0..000000000--- a/web/fly_import_env.cjs+++ /dev/null@@ -1,60 +0,0 @@-const fs = require('fs')-const { execSync } = require('child_process')---const args = process.argv.slice(2)--function parseArgs(args) {- const parsedArgs = {}- let i = 0- while (i < args.length) {- const arg = args[i]- if (arg.startsWith('--')) {- const key = arg.slice(2)- const value = args[i + 1]- parsedArgs[key] = value- i += 2- } else {- i += 1- }- }- return parsedArgs-}--function getSecretsFromEnvFile(envFile) {- const kvPairs = {}-- const fileContents = fs.readFileSync(envFile, 'utf8')- const lines = fileContents.split('\n')- for (const line of lines) {- const trimmedLine = line.trim()- if (!trimmedLine || trimmedLine.startsWith('#')) {- continue- }- const [key, value] = trimmedLine.split('=', 2)- if (!value) {- continue- }- const strippedValue = value.replace(/["']/g, '')- kvPairs[key] = strippedValue- }-- return kvPairs-}--function flyImport(secrets) {- const buildSecrets = []- for (const [key, value] of Object.entries(secrets)) {- buildSecrets.push(`${key}=${value}`)- console.log(`Set .env variable ${key}`)- }-- const command = ['flyctl', 'secrets', 'import', ...buildSecrets]-- console.log(`Running command: ${command.join(' ')}`)- execSync(command.join(' '), { stdio: 'inherit' })-}--const parsedArgs = parseArgs(args)-const envValues = getSecretsFromEnvFile(parsedArgs['env-file'])-flyImport(envValues)diff --git a/web/knip.jsonc b/web/knip.jsoncindex f5816c7b4..89f20b93f 100644--- a/web/knip.jsonc+++ b/web/knip.jsonc@@ -7,7 +7,6 @@"tailwindcss","eslint-import-resolver-node"],- "ignoreBinaries": ["flyctl"],"ignore": ["./ecosystem.config.js", "./app/routes.ts", "./react-router.config.ts", "./app/routes/[robots.txt].tsx"],"project": ["./app/**/*.{js,ts,tsx,jsx,cjs}"],"paths": {diff --git a/web/package.json b/web/package.jsonindex d848de65d..1747b6a0b 100644--- a/web/package.json+++ b/web/package.json@@ -6,8 +6,6 @@"scripts": {"build": "react-router build","dev": "react-router dev",- "deploy": "flyctl deploy --remote-only",- "import-env": "node fly_import_env.js --env-file .env","dev:staging": "cross-env STAGING=true react-router dev","start": "react-router-serve ./build/server/index.js","start:staging": "cross-env STAGING=true react-router-serve ./build/server/index.js",