Add v1 12d20 212
This commit is contained in:
parent
e9d15b2fcf
commit
0cbc1af836
@ -26,8 +26,8 @@ services:
|
||||
# Web Application (Next.js)
|
||||
webapp:
|
||||
build:
|
||||
context: ./webapp
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
dockerfile: webapp/Dockerfile
|
||||
target: runner
|
||||
container_name: infinity-webapp
|
||||
restart: unless-stopped
|
||||
@ -44,55 +44,53 @@ services:
|
||||
networks:
|
||||
- infinity-network
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "http://localhost:3000/api/health"]
|
||||
test: ["CMD", "wget", "--spider", "http://localhost:3000"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
|
||||
# Worker Service
|
||||
worker:
|
||||
build:
|
||||
context: ./worker
|
||||
dockerfile: Dockerfile
|
||||
container_name: infinity-worker
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mongodb:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- NODE_ENV=${NODE_ENV:-production}
|
||||
- DB_URI=${DB_URI}
|
||||
env_file: .env
|
||||
networks:
|
||||
- infinity-network
|
||||
# Worker Service (temporarily disabled for initial deployment)
|
||||
# worker:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: worker/Dockerfile
|
||||
# container_name: infinity-worker
|
||||
# restart: unless-stopped
|
||||
# depends_on:
|
||||
# mongodb:
|
||||
# condition: service_healthy
|
||||
# environment:
|
||||
# - NODE_ENV=${NODE_ENV:-production}
|
||||
# - DB_URI=${DB_URI}
|
||||
# env_file: .env
|
||||
# networks:
|
||||
# - infinity-network
|
||||
|
||||
# Helper Service (runs once to create admin account)
|
||||
create-admin:
|
||||
build:
|
||||
context: ./helpers
|
||||
dockerfile: Dockerfile
|
||||
container_name: infinity-create-admin
|
||||
depends_on:
|
||||
mongodb:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- DB_URI=${DB_URI}
|
||||
- ADMIN_USERNAME=${ADMIN_USERNAME}
|
||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
- NODE_ENV=${NODE_ENV:-production}
|
||||
env_file: .env
|
||||
networks:
|
||||
- infinity-network
|
||||
command: sh -c "python create_account.py"
|
||||
profiles: ["create-admin"]
|
||||
# create-admin:
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: helpers/Dockerfile
|
||||
# container_name: infinity-create-admin
|
||||
# depends_on:
|
||||
# mongodb:
|
||||
# condition: service_healthy
|
||||
# environment:
|
||||
# - DB_URI=${DB_URI}
|
||||
# - ADMIN_USERNAME=${ADMIN_USERNAME}
|
||||
# - ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
# - NODE_ENV=${NODE_ENV:-production}
|
||||
# env_file: .env
|
||||
# networks:
|
||||
# - infinity-network
|
||||
# command: sh -c "python create_account.py"
|
||||
# profiles: ["create-admin"]
|
||||
|
||||
networks:
|
||||
infinity-network:
|
||||
driver: bridge
|
||||
name: infinity-network
|
||||
|
||||
volumes:
|
||||
mongodb_data:
|
||||
driver: local
|
||||
name: infinity-mongodb-data
|
||||
driver: local
|
||||
@ -31,8 +31,7 @@ WORKDIR /app
|
||||
RUN apk add --no-cache dumb-init
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup --system --gid 1001 nodejs && \
|
||||
adduser --system --uid 1001 nextjs
|
||||
RUN addgroup -S nodejs && adduser -S nextjs -G nodejs
|
||||
|
||||
# Copy necessary files from builder
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
|
||||
Loading…
Reference in New Issue
Block a user