Compare commits
5 Commits
main
...
local-dev-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d53aa794a | ||
|
|
12175b3955 | ||
|
|
2bcc71d24c | ||
|
|
9484cb9b93 | ||
|
|
a56ef1b06f |
55
docker-compose.yaml
Normal file
55
docker-compose.yaml
Normal 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
18
local/Dockerfile
Normal 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" ]
|
||||
9
local/scripts/entrypoint.sh
Normal file
9
local/scripts/entrypoint.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "comfy deploy container starting.."
|
||||
|
||||
echo "Running migrations.."
|
||||
bun migrate-local
|
||||
|
||||
echo "Starting comfy deploy.."
|
||||
bun dev
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user