Compare commits
No commits in common. "e6c86d83918ef2a0e5d67d23f94a4ed09481fe14" and "82c9c5b826072d9f98ddfd460f326ad834cb9f4a" have entirely different histories.
e6c86d8391
...
82c9c5b826
@ -6,10 +6,13 @@ WORKDIR /app
|
|||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm i
|
RUN npm i
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV PUBLIC_PB_URL=http://localhost:8080
|
ENV PUBLIC_PB_URL=http://pb:8080
|
||||||
ENV PUBLIC_URL=http://localhost:4321
|
ENV PUBLIC_URL=http://localhost:4321
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Setup PocketBase and combine with the built app
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
ARG PB_VERSION=0.29.2
|
ARG PB_VERSION=0.29.2
|
||||||
|
|
||||||
WORKDIR /pb
|
WORKDIR /pb
|
||||||
@ -30,9 +33,15 @@ RUN unzip /tmp/pb.zip -d /pb/
|
|||||||
COPY api/docker-entrypoint.sh /usr/local/bin/
|
COPY api/docker-entrypoint.sh /usr/local/bin/
|
||||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
# # Set environment variables (keeping them as they are)
|
# Create app directory and copy built application
|
||||||
# ENV PUBLIC_PB_URL=http://pb:8080
|
WORKDIR /app
|
||||||
# ENV PUBLIC_URL=http://localhost:4321
|
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
|
||||||
|
|
||||||
VOLUME [ "/pb/pb_data", "/pb/pb_migrations", "/pb/pb_hooks" ]
|
VOLUME [ "/pb/pb_data", "/pb/pb_migrations", "/pb/pb_hooks" ]
|
||||||
# VOLUME [ "/pb/pb_data" ]
|
# VOLUME [ "/pb/pb_data" ]
|
||||||
@ -46,5 +55,4 @@ RUN echo '#!/bin/bash' > /usr/local/bin/start-services.sh && \
|
|||||||
echo 'wait' >> /usr/local/bin/start-services.sh && \
|
echo 'wait' >> /usr/local/bin/start-services.sh && \
|
||||||
chmod +x /usr/local/bin/start-services.sh
|
chmod +x /usr/local/bin/start-services.sh
|
||||||
|
|
||||||
ENTRYPOINT ["start-services.sh"]
|
CMD ["start-services.sh"]
|
||||||
|
|
||||||
|
@ -1,30 +1,16 @@
|
|||||||
# 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:
|
services:
|
||||||
recipie:
|
web:
|
||||||
build:
|
build: .
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile.combined
|
|
||||||
env_file: .env
|
env_file: .env
|
||||||
ports:
|
ports:
|
||||||
- "4321:4321"
|
- "4321:4321"
|
||||||
- "8080:8080" # optional, for manual pocketbase access
|
|
||||||
|
pb:
|
||||||
|
build: api
|
||||||
|
env_file: .env
|
||||||
volumes:
|
volumes:
|
||||||
- ./api/pb_data:/pb/pb_data
|
- ./api/pb_data:/pb/pb_data
|
||||||
- ./api/pb_migrations:/pb/pb_migrations
|
- ./api/pb_migrations:/pb/pb_migrations
|
||||||
- ./api/pb_hooks:/pb/pb_hooks
|
- ./api/pb_hooks:/pb/pb_hooks
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
Loading…
x
Reference in New Issue
Block a user