From 281ab4bd76338b9b99e0106f24b205e00161a49c Mon Sep 17 00:00:00 2001 From: docker <> Date: Wed, 13 Sep 2023 00:28:48 +0800 Subject: [PATCH] Initial commit --- .env | 7 +++++++ .gitignore | 1 + README.md | 11 +++++++++++ docker-compose.yaml | 24 ++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 README.md create mode 100644 docker-compose.yaml diff --git a/.env b/.env new file mode 100644 index 0000000..1d81bba --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +NAME="def" + +COMPOSE_PROJECT_NAME=$NAME +TZ=Asia/Shanghai +TERM=xterm-256color + +DIR=. \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ + diff --git a/README.md b/README.md new file mode 100644 index 0000000..806a565 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Docker Template + +> Docker Compose 模版文件 + +```shell +. +├── .env +├── .gitignore +├── README.md +└── docker-compose.yaml +``` \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..b68b7a2 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,24 @@ +version: '3' +services: + app: + # command: command + container_name: v2 + image: app:latest + restart: always + ports: + - 3111-3222:3111-3222 + networks: + - local + volumes: + - ${DIR}:/etc/app + - /etc/localtime:/etc/localtime:ro + + environment: + APP_ADDRESS: 0.0.0.0:3111 + +networks: + local: + name: local + external: true + +