Commit 4e8b7846 authored by Jose V. Trigueros's avatar Jose V. Trigueros

WAL mode

parent 3bfcb23a
Pipeline #86187699 passed with stages
in 15 minutes and 42 seconds
......@@ -43,3 +43,4 @@ ansible/roles/geerlingguy.*
*.log
src/main/resources/dev.properties
restic/
FROM openjdk:8-jre-slim
ENV VERSION 0.33.2
WORKDIR /app
ADD https://raw.githubusercontent.com/metabase/metabase/v$VERSION/bin/start /app/bin/
ADD http://downloads.metabase.com/v$VERSION/metabase.jar /app/target/uberjar/
CMD ["bash", "/app/bin/start"]
......@@ -2,6 +2,9 @@ TIMESTAMP ?= $(shell date -u +%FT%TZ)
VERSION ?= dev
REVISION ?= $(shell git rev-parse --short HEAD)
# Source: https://stackoverflow.com/a/43566158/358059
SHELL := /bin/bash
build:
docker build --build-arg VCS_REF=${REVISION} --build-arg BUILD_DATE=${TIMESTAMP} --build-arg VERSION=${VERSION} -t pawabot/pawa:${VERSION} .
......@@ -10,3 +13,7 @@ package:
clean:
mvn.exe clean
download-db-backup:
source restic/b2_env.sh
restic dump latest '/opt/pawa/data/database/settings.db.backup' > data/database/settings.db
......@@ -15,7 +15,7 @@ services:
- ${ENV:-sample}.env
environment:
- TZ=America/Los_Angeles
- JAVA_TOOL_OPTIONS=-Dlog4j.configurationFile=log4j2-prod.xml
- JAVA_TOOL_OPTIONS=-Dlog4j.configurationFile=log4j2-prod.xml -Xms1G -Xmx1536m
volumes:
- ./data:/app/data
restart: on-failure:5
......@@ -30,20 +30,17 @@ services:
logging:
<<: *logging
data:
build:
context: .
dockerfile: Dockerfile.metabase
image: metabase/metabase:v0.33.2-custom
image: metabase/metabase:v0.33.3
environment:
- TZ=America/Los_Angeles
- MB_DB_FILE=/tmp/metabase.db
- MB_DB_FILE=/opt/metabase/metabase.db
volumes:
- ./data/metabase:/tmp
- ./data/settings.db:/opt/bot.db
- ./data/metabase:/opt/metabase
- ./data/database:/opt/database
logging:
<<: *logging
datastore:
image: minio/minio:RELEASE.2019-09-05T23-24-38Z
image: minio/minio:RELEASE.2019-09-26T19-42-35Z
command: -c "MINIO_SECRET_KEY=$$DS_SECRET_KEY MINIO_ACCESS_KEY=$$DS_ACCESS_KEY minio gateway b2"
entrypoint: sh
env_file:
......
#!/usr/bin/env bash
cp $PWD/data/settings.db $PWD/data/settings-$(date +%Y-%m-%dT%H:%M%::z).db
cp "$PWD/data/database/settings.db" "$PWD/data/database/settings-$(date +%Y-%m-%dT%H_%M%::z).db"
docker run \
--rm \
-v $PWD/sql:/flyway/sql \
-v $PWD/conf:/flyway/conf \
-v $PWD/data:/flyway/data \
-v "$PWD/sql:/flyway/sql" \
-v "$PWD/conf:/flyway/conf" \
-v "$PWD/data:/flyway/data" \
boxfuse/flyway \
migrate
No preview for this file type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment