Initial commit from DCSP - 2025/12/2 14:15:16
This commit is contained in:
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# 容器1 的 Docker Compose 配置
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
容器1:
|
||||||
|
build: .
|
||||||
|
container_name: 容器1
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
volumes:
|
||||||
|
- ./data:/app/data
|
||||||
|
restart: unless-stopped
|
||||||
19
dockerfile
Normal file
19
dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# 容器1 的 Dockerfile
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
# 设置工作目录
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 复制文件
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# 安装依赖
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
python3 \
|
||||||
|
python3-pip
|
||||||
|
|
||||||
|
# 暴露端口
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
# 启动命令
|
||||||
|
CMD ["python3", "app.py"]
|
||||||
Reference in New Issue
Block a user