From ea855dc311b0ebd2fc480a29243469496f813fa1 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Fri, 24 Mar 2023 19:55:15 +0400 Subject: [PATCH] Changed docker image naming style, removed(commented) healthcheck --- Makefile | 6 +++--- docker-compose.yml | 26 ++++++++++++-------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 5561480..7360c39 100644 --- a/Makefile +++ b/Makefile @@ -43,8 +43,8 @@ cmd-dev: cmd-docker-build: docker build \ - -t ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE}:latest \ - -t ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE}:$${VERSION} . + -t ${REPO_OWNER_LOWER}/${REPO_NAME_KEBAB}:latest \ + -t ${REPO_OWNER_LOWER}/${REPO_NAME_KEBAB}:$${VERSION} . cmd-docker-push: - docker push -a ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE} + docker push -a ${REPO_OWNER_LOWER}/${REPO_NAME_KEBAB} diff --git a/docker-compose.yml b/docker-compose.yml index beac7ed..032fcaf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,35 +3,33 @@ version: "3" services: app: - image: ${REPO_OWNER_LOWER}/${REPO_NAME_SNAKE}:latest - container_name: ${REPO_NAME_SNAKE} + image: ${REPO_OWNER_LOWER}/${REPO_NAME_KEBAB}:latest + container_name: ${REPO_NAME_KEBAB}-app restart: unless-stopped ports: - "8080:8000" links: - database env_file: .env - depends_on: - database: - condition: service_healthy database: - image: mariadb:latest - container_name: ${REPO_NAME_SNAKE}_db + image: linuxserver/mariadb:latest + container_name: ${REPO_NAME_KEBAB}-db restart: unless-stopped volumes: #- "./database:/var/lib/mysql" - - "db_data:/var/lib/mysql" + - "database:/var/lib/mysql" env_file: .env_db - healthcheck: - test: sh -c "mysqladmin ping -u$$$$MYSQL_USER -p$$$$MYSQL_PASSWORD" - interval: 1s - timeout: 3s - retries: 20 + # Uncomment if needed + #healthcheck: + # test: sh -c "mysqladmin ping -u$$$$MYSQL_USER -p$$$$MYSQL_PASSWORD" + # interval: 2s + # timeout: 3s + # retries: 20 # Comment or remove these lines and # edit `volumes` in services->database # if you are going to store # your DB in a directory volumes: - db_data: + database: