diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..4f75c951 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +node_modules +.git +.gitignore +*.md +dist diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..f9cba20b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:11 +COPY . /app +WORKDIR /app +RUN apt-get update +RUN apt-get install -y wget curl make sudo unzip +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - +RUN apt-get install -y nodejs +RUN npm i -g pnpm +RUN pnpm install +EXPOSE 9527 +CMD [ "pnpm", "dev" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..8392aeb8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' + +services: + ray-template: + build: . + container_name: ray-template + restart: unless-stopped + environment: + - TZ=Asia/Shanghai + ports: + - "9527:9527" + # if you want to persist +# volumes: +# - ./app:/app