docker-compose fix 68/96468/2
authorDominik Mizyn <d.mizyn@samsung.com>
Tue, 1 Oct 2019 12:51:51 +0000 (14:51 +0200)
committerDominik Mizyn <d.mizyn@samsung.com>
Thu, 3 Oct 2019 08:25:56 +0000 (10:25 +0200)
docker-compose fix

Issue-ID: PORTAL-710
Change-Id: I613a86c1cbc1446ead5f4e543bb09fcd288a4a7a
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
portal-BE/build.sh
portal-BE/docker-compose.yml
portal-BE/dockerfile.mariadb [deleted file]
portal-BE/my.cnf

index 5c94036..6895338 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/bash
 
 mvn clean install
-docker build -t portal_mariadb -f dockerfile.mariadb .
 docker build -t portal_app .
 docker-compose up
index 7c44e82..2228a99 100644 (file)
@@ -6,14 +6,21 @@
 # docker login -u USER -p PASS nexus3.onap.org:10001
 # Uses healthcheck feature added in docker-compose v2.1
 
-version: '2.1'
+version: '3.1'
 
 services:
   portal-db:
-    image: portal_mariadb
+    image: mariadb
+#    image: mysql
     container_name: portal_mariaDB
+    ports:
+      - 3306:3306
+    restart: on-failure
     environment:
-      MYSQL_DATABASE: testdb
+      - MYSQL_DATABASE=testdb
+      - MYSQL_USER=portal
+      - MYSQL_PASSWORD=Test123456
+      - MYSQL_RANDOM_ROOT_PASSWORD=yes
     healthcheck:
       test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
     networks:
@@ -26,8 +33,7 @@ services:
     ports:
       - 8080:8080
     depends_on:
-      portal-db:
-        condition: service_healthy
+      - portal-db
     networks:
       - backend
 
diff --git a/portal-BE/dockerfile.mariadb b/portal-BE/dockerfile.mariadb
deleted file mode 100644 (file)
index f8fb49f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-FROM mariadb:latest
-
-ADD my.cnf /etc/mysql/my.cnf
-ENV MYSQL_USER portal
-ENV MYSQL_PASSWORD Test123456
-ENV MYSQL_ROOT_PASSWORD klasjfhaskrigudsb
-EXPOSE 3306
\ No newline at end of file
index d58210f..983b8e3 100644 (file)
@@ -16,7 +16,7 @@
 # escpecially if they contain "#" chars...
 # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
 [client]
-port            = 3306
+#port            = 3306
 socket          = /var/run/mysqld/mysqld.sock
 
 # Here is entries for some specific programs
@@ -36,7 +36,7 @@ skip-name-resolve
 #user           = mysql
 pid-file        = /var/run/mysqld/mysqld.pid
 socket          = /var/run/mysqld/mysqld.sock
-port            = 3306
+#port            = 3306
 basedir         = /usr
 datadir         = /var/lib/mysql
 tmpdir          = /tmp
@@ -135,9 +135,9 @@ max_binlog_size         = 100M
 # Read the manual for more InnoDB related options. There are many!
 default_storage_engine  = InnoDB
 # you can't just change log file size, requires special procedure
-#innodb_log_file_size   = 50M
+#innodb_log_file_size   = 2047M
 innodb_buffer_pool_size = 256M
-innodb_log_buffer_size  = 8M
+innodb_log_buffer_size  = 32M
 innodb_file_per_table   = 1
 innodb_open_files       = 400
 innodb_io_capacity      = 400

© 2017 ONAP. Copyright © The Linux Foundation ®. All Rights Reserved.
The Linux Foundation has registered trademarks and uses trademarks.
For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.
Linux is a registered trademark of Linus Torvalds.
Privacy Policy and Terms of Use