diff --git a/.env b/.env deleted file mode 100644 index 5c01d57..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -JWT_SECRET=cab2f6a968c2a11601bb33c41c5940b7 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9cb3b79..9a700c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,10 +25,10 @@ RUN go build FROM debian:bookworm-slim #ENV FRONTEND_HOST=https://app.nkode.tech -ENV FRONTEND_HOST=http://localhost:8090 -ENV SVG_DIR=/app/data/icons -ENV DB_PATH=/app/data/sqlite/nkode.db -ENV SQLITE_DB=/app/data/sqlite/nkode.db +#ENV FRONTEND_HOST=http://localhost:8090 +#ENV SVG_DIR=/app/data/icons +#ENV DB_PATH=/app/data/sqlite/nkode.db +#ENV SQLITE_DB=/app/data/sqlite/nkode.db # Set the working directory inside the runtime container WORKDIR /app diff --git a/compose.yaml b/coolify_compose.yaml similarity index 54% rename from compose.yaml rename to coolify_compose.yaml index 2f5c3d5..53ee3fb 100644 --- a/compose.yaml +++ b/coolify_compose.yaml @@ -1,14 +1,14 @@ -version: '3.9' - services: go-nkode: container_name: go-nkode - build: # This tells Docker Compose to build the image first - context: . + image: registry.infra.nkode.tech/go-nkode volumes: - /var/go-nkode/sqlite:/app/data/sqlite - /var/go-nkode/icons:/app/data/icons - # .env should contain JWT_SECRET environment: - JWT_SECRET=${JWT_SECRET} + - FRONTEND_HOST=${FRONTEND_HOST} + - SVG_DIR=${SVG_DIR} + - DB_PATH=${DB_PATH} + - SQLITE_DB=${SQLITE_DB} diff --git a/deploy_api.sh b/deploy_api.sh deleted file mode 100644 index f960970..0000000 --- a/deploy_api.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Create a temporary directory to hold the files -#mkdir -p /tmp/nkodeapi -# -#cp -r ./core/* /tmp/nkodeapi/ -#cp -r ./hashset/* /tmp/nkodeapi/ -#cp -r ./py-builtin/* /tmp/nkodeapi/ -#cp -r ./util/* /tmp/nkodeapi/ -# -#cp go.mod /tmp/nkodeapi/ -#cp main.go /tmp/nkodeapi/ - - -# Disable extended attributes and create the tar file -export COPYFILE_DISABLE=1 -tar -cvf go-nkode.tar -C ../ go-nkode - - -#scp go-nkode.tar dkelly@api.nkode.tech:/home/dkelly - -scp api.nkode.tech dkelly@217.21.78.137:/home/dkelly -scp go-nkode.tar dkelly@217.21.78.137:/home/dkelly - -rm go-nkode.tar diff --git a/docker_build.sh b/docker_build.sh index 55acca3..26b89f7 100644 --- a/docker_build.sh +++ b/docker_build.sh @@ -1 +1 @@ -docker build -t go-nkode . \ No newline at end of file +docker buildx build --platform linux/amd64,linux/arm64 -t registry.infra.nkode.tech/go-nkode:latest --push . diff --git a/docker_run.sh b/docker_run.sh deleted file mode 100644 index 236e43e..0000000 --- a/docker_run.sh +++ /dev/null @@ -1,5 +0,0 @@ -docker run --name go-nkode -p 8080:8080 \ - -v /Users/donov/databases/:/app/data/sqlite \ - -v /Users/donov/Desktop/go-nkode/core/sqlite-init/flaticon_colored_svgs/:/app/data/icons \ - -e JWT_SECRET=cab2f6a968c2a11601bb33c41c5940b7 \ - go-nkode \ No newline at end of file diff --git a/secure_bytes.sh b/secure_bytes.sh deleted file mode 100644 index d9f7692..0000000 --- a/secure_bytes.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Define the number of bytes you want to generate -num_bytes=16 - -# Use dd to read cryptographically secure bytes from /dev/urandom -# and convert them to hexadecimal using od -secure_bytes=$(dd if=/dev/urandom bs=1 count=$num_bytes 2>/dev/null | od -An -tx1) - -# Remove leading/trailing spaces and concatenate the hex bytes into a single string -secure_bytes=$(echo $secure_bytes | tr -d ' \n') - -# Output the result as a hexadecimal string -echo "Cryptographically secure bytes (as hex): $secure_bytes"