summaryrefslogtreecommitdiffstats
path: root/portal-BE
diff options
context:
space:
mode:
authorDominik Mizyn <d.mizyn@samsung.com>2019-10-01 14:51:51 +0200
committerDominik Mizyn <d.mizyn@samsung.com>2019-10-03 10:25:56 +0200
commitf2805494b772201a94334e2c2f72315cacd8266b (patch)
treef69ccab3eab9cc4005ae9b1e99c3f659dee5db42 /portal-BE
parent1b2222568e5e8f32fa0f18fc854f9df79e8508f3 (diff)
docker-compose fix
docker-compose fix Issue-ID: PORTAL-710 Change-Id: I613a86c1cbc1446ead5f4e543bb09fcd288a4a7a Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'portal-BE')
-rwxr-xr-xportal-BE/build.sh1
-rw-r--r--portal-BE/docker-compose.yml16
-rw-r--r--portal-BE/dockerfile.mariadb7
-rw-r--r--portal-BE/my.cnf8
4 files changed, 15 insertions, 17 deletions
diff --git a/portal-BE/build.sh b/portal-BE/build.sh
index 5c940365..68953384 100755
--- a/portal-BE/build.sh
+++ b/portal-BE/build.sh
@@ -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
diff --git a/portal-BE/docker-compose.yml b/portal-BE/docker-compose.yml
index 7c44e82f..2228a997 100644
--- a/portal-BE/docker-compose.yml
+++ b/portal-BE/docker-compose.yml
@@ -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
index f8fb49f1..00000000
--- a/portal-BE/dockerfile.mariadb
+++ /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
diff --git a/portal-BE/my.cnf b/portal-BE/my.cnf
index d58210f7..983b8e31 100644
--- a/portal-BE/my.cnf
+++ b/portal-BE/my.cnf
@@ -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