Selaa lähdekoodia

Update local Docker

Dmitriy Gnatenko 6 päivää sitten
vanhempi
commit
c5336704b5
2 muutettua tiedostoa jossa 25 lisäystä ja 24 poistoa
  1. 8 7
      docker-compose.yml
  2. 17 17
      readme.md

+ 8 - 7
docker-compose.yml

@@ -2,15 +2,16 @@ version: "3"
 
 services:
   db:
-    image: postgres:15.1-alpine
+    image: mariadb:11.5
     ports:
-      - ${DB_PORT}:5432
+      - ${DB_PORT}:3306
     volumes:
-      - dmitriygnatenko_pg_data:/var/lib/postgresql/data
+      - mariadb:/var/lib/mysql
     environment:
-      - POSTGRES_DB=${DB_NAME}
-      - POSTGRES_USER=${DB_USER}
-      - POSTGRES_PASSWORD=${DB_PASSWORD}
+      MARIADB_DATABASE: ${DB_NAME}
+      MARIADB_USER: ${DB_USER}
+      MARIADB_PASSWORD: ${DB_PASSWORD}
+      MARIADB_ROOT_PASSWORD: ${DB_PASSWORD}
 
 volumes:
-  dmitriygnatenko_pg_data:
+  mariadb:

+ 17 - 17
readme.md

@@ -1,6 +1,6 @@
-### Формат файла конфигурации приложения
+### Config example
 
-config/.env
+.env
 
 ```
 # APP
@@ -11,7 +11,7 @@ CORS_ALLOW_ORIGIN=*
 CORS_ALLOW_METHODS=GET,POST,PUT,DELETE
 
 # DB
-DB_DRIVER=postgres
+DB_DRIVER=mysql
 DB_HOST=localhost
 DB_PORT=1111
 DB_NAME=db
@@ -60,21 +60,21 @@ LOGGER_EMAIL_RECIPIENT=info@dmitriygnatenko.ru
 LOGGER_EMAIL_SUBJECT=Error from dmitriygnatenko.ru
 ```
 
-### Команды
+### Commands
 
-- make run (запуск приложения)
-- make test (запуск тестов)
-- make test-cover (статистика по покрытию тестами)
-- make lint (запуск линтера)
-- make migration-status (статус миграций)
-- make migration-up (применение миграций)
-- make migration-down (откат миграций)
-- make docker-build (сборка контейнеров)
-- make docker-up (запуск контейнеров)
-- make docker-down (остановка контейнеров)
-- make install-deps (установка зависимостей)
-- make app-build (компиляция приложения)
+- make run (run application)
+- make test (run tests)
+- make test-cover (test coverage statistics)
+- make lint (run linter)
+- make migration-status (migrations status)
+- make migration-up (apply migrations)
+- make migration-down (rollback migrations)
+- make docker-build (build and run Docker containers)
+- make docker-up (run Docker containers)
+- make docker-down (stop Docker containers)
+- make install-deps (dependencies installation)
+- make app-build (compile application)
 
-### Метрики (защищены Basic auth)
+### Metrics (protected by Basic auth)
 
 /metrics