From a1d1e36924d59a13666ec1b91eb5ce9f94f67d0e Mon Sep 17 00:00:00 2001 From: Anduin Xue Date: Wed, 2 Aug 2023 10:42:57 +0000 Subject: [PATCH] Create docker-compose.yml to one click start up. --- docker-compose.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..972981746 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3' +services: + db: + image: mariadb + restart: always + environment: + MYSQL_ROOT_PASSWORD: ROOT_SUPER_EVIL_PASSWORD@1234 + MYSQL_DATABASE: AppDatabase + MYSQL_USER: WebApp + MYSQL_PASSWORD: WebApp@Passw0rd + ports: + - "3306:3306" + web: + build: . + environment: + ConnectionStrings__MoongladeDatabase: "Server=db;Database=AppDatabase;Uid=WebApp;Pwd=WebApp@Passw0rd;" + ConnectionStrings__DatabaseType: "MySQL" + ports: + - "8080:80" + depends_on: + - db + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80"] + interval: 30s + timeout: 10s + retries: 5