Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevcody committed Nov 17, 2023
1 parent 359b93d commit 7b12471
Show file tree
Hide file tree
Showing 25 changed files with 16,005 additions and 3,129 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

.env

# dependencies
/node_modules
/.pnp
Expand Down
16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app/globals.css",
"baseColor": "slate",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.9"
services:
pantry-tracker-db:
image: postgres
restart: always
container_name: pantry-tracker-db
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: example
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres

volumes:
postgres:
11 changes: 11 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import "dotenv/config";
import type { Config } from "drizzle-kit";

export default {
schema: "./src/db/schema.ts",
out: "./drizzle/migrations",
driver: "pg",
dbCredentials: {
connectionString: process.env.DATABASE_URL!,
},
} satisfies Config;
4 changes: 4 additions & 0 deletions drizzle/migrations/0000_naive_the_fury.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE TABLE IF NOT EXISTS "items" (
"id" serial PRIMARY KEY NOT NULL,
"name" varchar(256)
);
37 changes: 37 additions & 0 deletions drizzle/migrations/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"id": "9334a3c4-ab47-4d9d-aaba-e1417cfdfaed",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "5",
"dialect": "pg",
"tables": {
"items": {
"name": "items",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "serial",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "varchar(256)",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"schemas": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}
13 changes: 13 additions & 0 deletions drizzle/migrations/meta/_journal.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "5",
"dialect": "pg",
"entries": [
{
"idx": 0,
"version": "5",
"when": 1700202589179,
"tag": "0000_naive_the_fury",
"breakpoints": true
}
]
}
3 changes: 3 additions & 0 deletions load-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

export $(cat $1 | xargs)
Loading

0 comments on commit 7b12471

Please sign in to comment.