diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index d8023a0..0000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -webapp/node_modules/ diff --git a/.env.example b/.env.example deleted file mode 100644 index e97a277..0000000 --- a/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -# used for getting list of sponsors -GITHUB_TOKEN=github_pat_blah-blah-blah diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b0c544b..0000000 --- a/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Stage 1: Build the frontend -FROM docker.io/node:22 AS frontend-build -WORKDIR /app/frontend -COPY webapp/package*.json ./ -RUN npm install -COPY webapp/tsconfig*.json ./ -COPY webapp/env.d.ts ./ -COPY webapp/vite.config.ts ./ -COPY webapp/index.html ./ -COPY webapp/public ./public/ -COPY webapp/src ./src/ -RUN npm run build - -# Stage 2: Build the Scala app -FROM docker.io/hseeberger/scala-sbt:8u222_1.3.5_2.13.1 AS scala-build -WORKDIR /app -COPY shotgun/project/ ./project -COPY shotgun/build.sbt ./build.sbt -COPY shotgun/ ./ -COPY --from=frontend-build /app/frontend/dist/ ../webapp/dist/ -RUN sbt assembly - -# Stage 3: Run the Scala app -FROM eclipse-temurin:11-jre-jammy -WORKDIR /app -COPY --from=scala-build /app/target/scala-2.12/shotgun-assembly-0.1.0-SNAPSHOT.jar ./shotgun-assembly-0.1.0-SNAPSHOT.jar -COPY --from=frontend-build /app/frontend/dist/ ../webapp/dist/ -CMD ["java", "-jar", "shotgun-assembly-0.1.0-SNAPSHOT.jar"] diff --git a/README.md b/README.md index 2fd39e8..c3bbdb2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DeFlock -Crowdsourced tool for locating and reporting ALPRs. [View Live Site](https://deflock.me). +Crowdsourced tool for locating and reporting ALPRs. [View Live Site](https://deflock.org). ![DeFlock Screenshot](./webapp/public/map-interface-nationwide.webp) diff --git a/api/server.ts b/api/server.ts index c669d56..0f26009 100644 --- a/api/server.ts +++ b/api/server.ts @@ -39,10 +39,8 @@ const start = async () => { origin: (origin, cb) => { const allowedOrigins = [ 'http://localhost:5173', // vite dev server - 'https://deflock.me', - 'https://www.deflock.me', - 'https://deflock.org', // will migrate - 'https://www.deflock.org', // will migrate + 'https://deflock.org', + 'https://www.deflock.org' ]; if (!origin || allowedOrigins.includes(origin) || /^https:\/\/.*\.deflock\.pages\.dev$/.test(origin)) { diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 4a9c4c9..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -services: - deflock: - image: public.ecr.aws/w2o0b9g0/deflock.me:latest - ports: - - 8080:8080 - restart: always - healthcheck: - test: curl --fail http://localhost:8080/api/healthcheck || exit 1 - interval: 30s # Time between health checks - timeout: 10s # Time to wait for a response - retries: 3 # Number of retries before marking as unhealthy - start_period: 10s # Time to wait before starting health checks - stdin_open: true - environment: - - GITHUB_TOKEN diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 9fea5da..0000000 --- a/nginx.conf +++ /dev/null @@ -1,48 +0,0 @@ -user www-data; -worker_processes auto; -pid /run/nginx.pid; -error_log /var/log/nginx/error.log; -include /etc/nginx/modules-enabled/*.conf; - -events { - worker_connections 1024; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - error_log /var/log/nginx/error.log warn; - sendfile on; - keepalive_timeout 65; - server { - listen 80; - listen [::]:80; - server_name deflock.me www.deflock.me; - - location / { - return 301 https://$host$request_uri; - } - } - - server { - listen 443 ssl; - listen [::]:443 ssl; - server_name deflock.me www.deflock.me; - - ssl_certificate /etc/letsencrypt/live/deflock.me/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/deflock.me/privkey.pem; - - location / { - proxy_pass http://localhost:8080; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } - } -} diff --git a/webapp/index.html b/webapp/index.html index dcbe079..729d17c 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -27,8 +27,8 @@ - - + + DeFlock @@ -37,10 +37,10 @@ "@context": "https://schema.org", "@type": "Organization", "name": "DeFlock", - "url": "https://deflock.me", + "url": "https://deflock.org", "sameAs": [ "https://github.com/FoggedLens/deflock", - "https://blog.deflock.me/", + "https://blog.deflock.org/", "https://apps.apple.com/us/app/deflock-me/id6752760780", "https://play.google.com/store/apps/details?id=me.deflock.deflockapp&hl=en_US&pli=1" ] diff --git a/webapp/public/robots.txt b/webapp/public/robots.txt index ebd105b..9870e5a 100644 --- a/webapp/public/robots.txt +++ b/webapp/public/robots.txt @@ -1,4 +1,4 @@ User-agent: * Allow: / Disallow: /api/ -Sitemap: https://deflock.me/sitemap.xml +Sitemap: https://deflock.org/sitemap.xml diff --git a/webapp/public/sitemap.xml b/webapp/public/sitemap.xml index 7d053f5..72b6de3 100644 --- a/webapp/public/sitemap.xml +++ b/webapp/public/sitemap.xml @@ -1,83 +1,83 @@ - https://deflock.me/ + https://deflock.org/ daily - https://deflock.me/map + https://deflock.org/map daily - https://deflock.me/about + https://deflock.org/about weekly - https://deflock.me/what-is-an-alpr + https://deflock.org/what-is-an-alpr weekly - https://deflock.me/report + https://deflock.org/report daily - https://deflock.me/report/id + https://deflock.org/report/id weekly - https://deflock.me/council + https://deflock.org/council weekly - https://deflock.me/app + https://deflock.org/app daily - https://deflock.me/app/docs + https://deflock.org/app/docs weekly - https://deflock.me/contact + https://deflock.org/contact weekly - https://deflock.me/terms + https://deflock.org/terms weekly - https://deflock.me/privacy + https://deflock.org/privacy weekly - https://deflock.me/qr + https://deflock.org/qr weekly - https://deflock.me/donate + https://deflock.org/donate daily - https://deflock.me/foia + https://deflock.org/foia daily - https://deflock.me/identify + https://deflock.org/identify daily - https://deflock.me/press + https://deflock.org/press daily - https://deflock.me/store + https://deflock.org/store daily - https://deflock.me/groups + https://deflock.org/groups daily - https://deflock.me/blog + https://deflock.org/blog daily diff --git a/webapp/src/views/Press.vue b/webapp/src/views/Press.vue index 0b194af..5ff812a 100644 --- a/webapp/src/views/Press.vue +++ b/webapp/src/views/Press.vue @@ -33,18 +33,18 @@

- <iframe src="https://deflock.me/map" width="100%" height="600" style="border: none;"></iframe> + <iframe src="https://deflock.org/map" width="100%" height="600" style="border: none;"></iframe>

- If you would like to localize the URL to a specific region, please zoom to the area at https://deflock.me/map and copy the URL from your browser's address bar. + If you would like to localize the URL to a specific region, please zoom to the area at https://deflock.org/map and copy the URL from your browser's address bar.

To remove the header bar, add the following query parameter to the URL: ?fullscreen=true. For example: - <iframe src="https://deflock.me/map?fullscreen=true#map=14/40.014863/-105.266275" width="100%" height="600" style="border: none;"></iframe> + <iframe src="https://deflock.org/map?fullscreen=true#map=14/40.014863/-105.266275" width="100%" height="600" style="border: none;"></iframe>