Compare commits

...

5 Commits

Author SHA1 Message Date
webcoderz
4d53aa794a Update Dockerfile 2024-04-11 00:15:05 -04:00
webcoderz
12175b3955 remove apt deletion 2024-04-10 22:55:05 -04:00
webcoderz
2bcc71d24c various fixes and getting closer to parity with main 2024-04-10 20:38:24 -04:00
webcoderz
9484cb9b93
Update docker-compose.yaml
adding Postgres port env var
2024-04-10 18:17:49 -04:00
webcoderz
a56ef1b06f adding local docker compose with local postgres 2024-03-28 11:15:46 -04:00
4 changed files with 84 additions and 2 deletions

55
docker-compose.yaml Normal file
View File

@ -0,0 +1,55 @@
version: '3.9'
services:
comfy-deploy:
build:
context: .
dockerfile: ./local/Dockerfile
restart: unless-stopped
volumes:
- ./local/scripts/entrypoint.sh:/comfyui-deploy/web/deploy_entrypoint.sh
entrypoint: /comfyui-deploy/web/deploy_entrypoint.sh
ports:
- 3000:3000
depends_on:
- postgres
- pg_proxy
- localstack
environment:
VSCODE_DEV_CONTAINER: true
### comfy-deploy services
postgres:
image: "postgres:15.2-alpine"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: verceldb
POSTGRES_PORT: 5480
expose:
- 5480
pg_proxy:
image: ghcr.io/neondatabase/wsproxy:latest
environment:
APPEND_PORT: "postgres:5480"
ALLOW_ADDR_REGEX: ".*"
LOG_TRAFFIC: "true"
expose:
- 80
depends_on:
- postgres
localstack:
image: localstack/localstack:latest
environment:
SERVICES: s3
ports:
- 4566:4566
volumes:
- ../localstack/aws:/etc/localstack/init/ready.d
- ../localstack/aws:/app/web/aws

18
local/Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:21-bullseye AS comfy_deploy
RUN apt-get update && apt-get install -y python3 make g++
RUN npm install -g bun
COPY ./web /web
WORKDIR /web
RUN cp .env.example .env.local
RUN bunx node-gyp
RUN bun i
ENTRYPOINT [ "bun", "dev" ]

View File

@ -0,0 +1,9 @@
#!/bin/bash
echo "comfy deploy container starting.."
echo "Running migrations.."
bun migrate-local
echo "Starting comfy deploy.."
bun dev

View File

@ -9,10 +9,10 @@ if (process.env.VERCEL_ENV !== "production") {
// Set the WebSocket proxy to work with the local instance
if (isDevContainer) {
// Running inside a VS Code devcontainer
neonConfig.wsProxy = (host) => "host.docker.internal:5481/v1";
neonConfig.wsProxy = (host) => "pg_proxy:80/v1";
} else {
// Not running inside a VS Code devcontainer
neonConfig.wsProxy = (host) => `${host}:5481/v1`;
neonConfig.wsProxy = (host) => "pg_proxy:80/v1";
}
// Disable all authentication and encryption
neonConfig.useSecureWebSocket = false;