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).  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 @@ - - + +
- If you would like to localize the URL to a specific region, please zoom to the area at
To remove the header bar, add the following query parameter to the URL: ?fullscreen=true. For example: