diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ea731fd..0000000 --- a/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -# Description: This file contains the instructions to build the Docker image for the application. -# Author: Levi McDonough - -# Stage 1: Build the Rust application -FROM --platform=arm64 rust:1.55 AS builder - -# Set the working directory -WORKDIR /usr/src/app - -# Copy the Cargo.toml and Cargo.lock files to the working directory -COPY Cargo.toml Cargo.lock ./ - -# Create an empty src directory and build dependencies (on a single layer) -RUN mkdir src && \ - echo "fn main() {}" > src/main.rd && \ - cargo build --release && \ - rm -rf src - -# Copy the source code to the working directory -COPY . . - -# Build the Rust application -RUN cargo build --release - - -# Stage 2: Create a smaller image with only the build binary -FROM --platform=arm64 debian:bullseye-slim - -# Set the working directory -WORKDIR /usr/srr/app - -# Copy the binary from the building stage to the working directory -COPY --from=builder /usr/src/app/target/release/app . - -# Expose the port that the application listens on -EXPOSE 8000 - -# Set the command to run the application -CMD ["./app"] diff --git a/Makefile b/Makefile deleted file mode 100644 index ef78821..0000000 --- a/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# Makefile - -.PHONY: help install_postgresql install_dbml2sql rebuild_db seed_db setup_db_manual run_migrations generate_entity - -help: - @echo " Available commands:" - @echo " install_postgresql Install - PostgreSQL using Homebrew" - @echo " install_dbml2sql Install dbml2sql tool using npm" - @echo " rebuild_db Run the rebuild_db.sh script with default settings" - @echo " seed_db Seed the database with test data" - @echo " setup_db_manual Set up the database manually using SQL commands" - @echo " run_migrations Run database migrations" - @echo " generate_entity Generate a new entity from the database" - -install_postgresql: - brew install postgresql - -install_dbml2sql: - npm install -g @dbml/cli - -rebuild_db: - ./scripts/rebuild_db.sh - -seed_db: - cargo run --bin seed_db - -setup_db_manual: - psql -U postgres -c "CREATE DATABASE refactor_platform;" - psql -U postgres -d refactor_platform -c "CREATE USER refactor WITH PASSWORD 'password';" - psql -U postgres -d refactor_platform -c "CREATE SCHEMA IF NOT EXISTS refactor_platform AUTHORIZATION refactor;" - psql -U postgres -d refactor_platform -c "GRANT ALL PRIVILEGES ON SCHEMA refactor_platform TO refactor;" - -run_migrations: - DATABASE_URL=postgres://refactor:password@localhost:5432/refactor_platform sea-orm-cli migrate up -s refactor_platform - -generate_entity: - DATABASE_URL=postgres://refactor:password@localhost:5432/refactor_platform sea-orm-cli generate entity -s refactor_platform -o entity/src -v --with-serde both --serde-skip-deserializing-primary-key --ignore-tables {table to ignore} --ignore-tables {other table to ignore} \ No newline at end of file diff --git a/docker/Dockerfile-db b/docker/Dockerfile-db new file mode 100644 index 0000000..e69de29 diff --git a/docker/Dockerfile-entity b/docker/Dockerfile-entity new file mode 100644 index 0000000..e69de29 diff --git a/docker/Dockerfile-service b/docker/Dockerfile-service new file mode 100644 index 0000000..e69de29