Skip to content

Commit

Permalink
Merge pull request #2 from palico-ai/fix-template
Browse files Browse the repository at this point in the history
FEAT: Updated template to use docker and presistant database
  • Loading branch information
shikdernyc authored Feb 13, 2024
2 parents 5807c40 + 5bc667a commit e576ae4
Show file tree
Hide file tree
Showing 10 changed files with 977 additions and 96 deletions.
4 changes: 1 addition & 3 deletions templates/base/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
node_modules
dist
palico.out
.DS_Store
yalc.lock
.yalc
.DS_Store
6 changes: 6 additions & 0 deletions templates/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json palico.json tsconfig.json ./
RUN npm install
COPY . .
RUN npm run build
28 changes: 28 additions & 0 deletions templates/base/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3.8"

services:
postgres_db:
image: postgres:15-alpine
restart: always
environment:
- POSTGRES_USER=root
- POSTGRES_PASSWORD=root
- POSTGRES_DB=root
ports:
# Standard port for PostgreSQL databases
- "5432:5432"
app:
depends_on:
- postgres_db
build: .
expose:
- "8000"
ports:
- 8000:8000
volumes:
- ./src:/app/src
command: npm run dev
environment:
- DB_URL=postgres://root:root@postgres_db:5432/root
- PORT=8000
- OPENAI_API_KEY=<your-openai-api-key>
Loading

0 comments on commit e576ae4

Please sign in to comment.