Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
unilei committed Dec 4, 2024
1 parent b593403 commit f29edf8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ COPY --from=builder /app/prisma ./prisma
ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=3000

# Dockerfile
ARG ADMIN_USER
ARG ADMIN_PASSWORD
ARG ADMIN_EMAIL
ARG JWT_SECRET
ARG DATABASE_URL
ARG DATABASE_SCHEMA

ENV ADMIN_USER=${ADMIN_USER}
ENV ADMIN_PASSWORD=${ADMIN_PASSWORD}
ENV ADMIN_EMAIL=${ADMIN_EMAIL}
ENV JWT_SECRET=${JWT_SECRET}
ENV DATABASE_URL=${DATABASE_URL}
ENV DATABASE_SCHEMA=${DATABASE_SCHEMA}

# 暴露端口
EXPOSE 3000

Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ services:
- "3000:3000" # 映射容器的 3000 端口到宿主机的 3000 端口
env_file:
- .env
environment:
# 显式声明环境变量
ADMIN_USER: ${ADMIN_USER}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
ADMIN_EMAIL: ${ADMIN_EMAIL}
JWT_SECRET: ${JWT_SECRET}
DATABASE_URL: ${DATABASE_URL}
DATABASE_SCHEMA: ${DATABASE_SCHEMA}
depends_on:
- prisma-migrate

Expand Down

0 comments on commit f29edf8

Please sign in to comment.