diff --git a/Dockerfile b/Dockerfile index 91ad4f9..8344a0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,15 @@ -# Dockerfile FROM node:20-alpine -# Set working directory WORKDIR /app -# Install dependencies COPY app/package*.json ./ RUN npm install -# Copy source COPY app . -# Build the static site -RUN npm run build +# Add this debug line: +RUN echo "Build starting..." && npm run build && echo "Build finished." && ls -la dist -# Serve with a lightweight server (e.g., serve) RUN npm install -g serve -CMD ["serve", "dist", "-l", "3000"] + +CMD ["serve", "dist", "-l", "4321"] diff --git a/app/package.json b/app/package.json index 0b0333e..aede901 100644 --- a/app/package.json +++ b/app/package.json @@ -3,7 +3,7 @@ "type": "module", "version": "0.0.1", "scripts": { - "dev": "astro dev", + "dev": "astro dev --host 0.0.0.0", "build": "astro build", "preview": "astro preview", "astro": "astro" diff --git a/docker-compose.yml b/docker-compose.yml index 2de61b8..2a00e49 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,31 +1,14 @@ -version: '3.8' - services: frontend: - build: - context: . - dockerfile: Dockerfile + container_name: PromptBase + image: promptbase + restart: unless-stopped + ports: - - "3333:3000" + - "4321:4321" volumes: - - ./app:/app - - ./app/node_modules + # - ./app:/app + # - ./app/node_modules:/app/node_modules - ./.env:/app/.env:ro # Bind-mount .env as read-only environment: - NODE_ENV=production - restart: unless-stopped - - supabase: - image: supabase/postgres:15 - ports: - - "54322:5432" - volumes: - - supabase-data:/var/lib/postgresql/data - environment: - POSTGRES_PASSWORD: ${SUPABASE_DB_PASSWORD} - POSTGRES_USER: postgres - POSTGRES_DB: postgres - restart: unless-stopped - -volumes: - supabase-data: