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