docker-compose.yml 853 B

123456789101112131415161718192021222324252627282930313233343536
  1. services:
  2. byreal-table:
  3. build:
  4. context: .
  5. dockerfile: Dockerfile
  6. args:
  7. SOL_ENDPOINT: ${SOL_ENDPOINT:-}
  8. container_name: byreal-table
  9. # 不要再映射 80:3000,改成内部用的 3000 端口(也可以直接去掉 ports,用 expose)
  10. expose:
  11. - '3000'
  12. environment:
  13. - SOL_ENDPOINT=${SOL_ENDPOINT}
  14. - SOL_SECRET_KEY=${SOL_SECRET_KEY}
  15. - NODE_ENV=production
  16. - NEXT_TELEMETRY_DISABLED=1
  17. restart: unless-stopped
  18. networks:
  19. - byreal-network
  20. nginx:
  21. image: nginx:alpine
  22. container_name: byreal-nginx
  23. depends_on:
  24. - byreal-table
  25. ports:
  26. - '80:80'
  27. volumes:
  28. - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
  29. - ./htpasswd:/etc/nginx/.htpasswd:ro
  30. networks:
  31. - byreal-network
  32. networks:
  33. byreal-network:
  34. driver: bridge