Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否添加linux环境docker配置 #1

Closed
DoubleHeer opened this issue Jul 31, 2023 · 3 comments
Closed

能否添加linux环境docker配置 #1

DoubleHeer opened this issue Jul 31, 2023 · 3 comments

Comments

@DoubleHeer
Copy link

我尝试在linux部署,但是没有成功。
puppeteer设置一直有问题。

@liuxy0551
Copy link
Collaborator

有考虑支持,但近期内不会完成。可以发送问题讨论一下

@DoubleHeer
Copy link
Author

# FROM node:14.21-bullseye
# FROM femtopixel/google-lighthouse-puppeteer:v10.4.0-puppeteer-v20.9.0-1.3.3
FROM buildkite/puppeteer  
# #最新包索引
# # FROM alpine:edge
# # FROM amd64/alpine:3.15
# # 拉取node镜像
# # FROM node:10-alpine


# 暴露端口
EXPOSE 4000
# USER root
WORKDIR /yice

# # 跳过自动安装 Chrome 包. 使用上面已经安装的 Chrome
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
    PUPPETEER_EXECUTABLE_PATH=/opt/google/chrome/chrome

# # 设置时区
# # RUN rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 创建目录
RUN mkdir -p /yice

# 复制源码
COPY ./dist /yice/dist
COPY ./node_modules /yice/node_modules
# 复制源码
COPY ./scripts /yice/scripts
COPY ./static /yice/static
# 复制源码
COPY ./.env /yice/
# 复制源码
COPY ./package.json /yice

COPY ./tsconfig.json /yice/
COPY ./tsconfig.build.json /yice/
# 复制源码
# COPY ./pnpm-lock.yaml /yice
# 复制源码
# COPY ./pm2 /yice/pm2


# # 复制源码
# # COPY ./chrome /yice/chrome

# # RUN npm install pm2 -g

# # 容器启动时,启动应用服务
# # CMD npm run pm2
CMD npm run start:prod
# # ENTRYPOINT pm2-runtime start pm2/config.json


这是我的docker配置,可以帮忙看看

@liuxy0551
Copy link
Collaborator

liuxy0551 commented Jul 11, 2024

Dockerfile: https://github.com/DTStack/yice-performance/blob/master/docs/docker.md
使用 docker 部署的文档:https://github.com/DTStack/yice-performance/blob/master/docs/docker.md

我看你已经 fork 修改了,这里是我部署的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants