mirror of https://github.com/openspug/spug
Create docker-compose.yml
parent
e9c161bcbe
commit
2e2f1ce2e4
|
@ -0,0 +1,35 @@
|
|||
version: "3.6"
|
||||
services:
|
||||
db:
|
||||
image: mariadb:10.8.2
|
||||
container_name: spug-db
|
||||
restart: always
|
||||
command: --port 3306 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||
volumes:
|
||||
- /data/spug/mysql:/var/lib/mysql
|
||||
environment:
|
||||
- MYSQL_DATABASE=spug
|
||||
- MYSQL_USER=spug
|
||||
- MYSQL_PASSWORD=spug.cc
|
||||
- MYSQL_ROOT_PASSWORD=spug.cc
|
||||
spug:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: spug
|
||||
privileged: true
|
||||
restart: always
|
||||
volumes:
|
||||
- /data/spug/service:/data/spug
|
||||
- /data/spug/repos:/data/repos
|
||||
ports:
|
||||
- "80:80"
|
||||
- "23:23" # telnet端口
|
||||
environment:
|
||||
- MYSQL_DATABASE=spug
|
||||
- MYSQL_USER=spug
|
||||
- MYSQL_PASSWORD=spug.cc
|
||||
- MYSQL_HOST=db
|
||||
- MYSQL_PORT=3306
|
||||
depends_on:
|
||||
- db
|
Loading…
Reference in New Issue