From ee9cb8972abcec7af0a5a739b59b71ed29018439 Mon Sep 17 00:00:00 2001 From: june Date: Wed, 13 Aug 2025 20:42:08 +1200 Subject: [PATCH] OOH that's closer --- Dockerfile.combined | 18 +++++------------- docker-compose.yml | 32 +++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/Dockerfile.combined b/Dockerfile.combined index 064fab2..0846954 100644 --- a/Dockerfile.combined +++ b/Dockerfile.combined @@ -10,9 +10,6 @@ ENV PUBLIC_PB_URL=http://pb:8080 ENV PUBLIC_URL=http://localhost:4321 RUN npm run build -# Stage 2: Setup PocketBase and combine with the built app -FROM alpine:latest - ARG PB_VERSION=0.29.2 WORKDIR /pb @@ -33,15 +30,9 @@ RUN unzip /tmp/pb.zip -d /pb/ COPY api/docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh -# Create app directory and copy built application -WORKDIR /app -COPY --from=app-builder /app . -# COPY --from=app-builder /app/package*.json ./ -# COPY --from=app-builder /app/node_modules ./node_modules - -# Set environment variables (keeping them as they are) -ENV PUBLIC_PB_URL=http://pb:8080 -ENV PUBLIC_URL=http://localhost:4321 +# # Set environment variables (keeping them as they are) +# ENV PUBLIC_PB_URL=http://pb:8080 +# ENV PUBLIC_URL=http://localhost:4321 VOLUME [ "/pb/pb_data", "/pb/pb_migrations", "/pb/pb_hooks" ] # VOLUME [ "/pb/pb_data" ] @@ -55,4 +46,5 @@ RUN echo '#!/bin/bash' > /usr/local/bin/start-services.sh && \ echo 'wait' >> /usr/local/bin/start-services.sh && \ chmod +x /usr/local/bin/start-services.sh -CMD ["start-services.sh"] +ENTRYPOINT ["start-services.sh"] + diff --git a/docker-compose.yml b/docker-compose.yml index 7769074..d9ed637 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,16 +1,30 @@ +# services: +# web: +# build: . +# env_file: .env +# ports: +# - "4321:4321" + +# pb: +# build: api +# env_file: .env +# volumes: +# - ./api/pb_data:/pb/pb_data +# - ./api/pb_migrations:/pb/pb_migrations +# - ./api/pb_hooks:/pb/pb_hooks +# ports: +# - "8080:8080" + services: - web: - build: . + recipie: + build: + context: . + dockerfile: Dockerfile.combined env_file: .env ports: - "4321:4321" - - pb: - build: api - env_file: .env + - "8080:8080" # optional, for manual pocketbase access volumes: - ./api/pb_data:/pb/pb_data - ./api/pb_migrations:/pb/pb_migrations - - ./api/pb_hooks:/pb/pb_hooks - ports: - - "8080:8080" \ No newline at end of file + - ./api/pb_hooks:/pb/pb_hooks \ No newline at end of file