mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-04 16:45:44 +00:00
fixed some table names to be singular migrated templates to separate repository added seed data to initial version in liquibase migrations instead of property files (post targets, emotes etc) and created some default tables containing those default values added separate artifacts to be used containing only the liquibase config added shell script as a wrapper for ansible deployment, to handle an environment variable defining whether or not the deployment should be executed added logback scan period added licenses for ansible, liquibase, docker and docker-compose
37 lines
1.3 KiB
Docker
37 lines
1.3 KiB
Docker
FROM ubuntu as base
|
|
MAINTAINER Sheldan
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG maven_version=3.6.3
|
|
ARG liquibase_version=3.8.9
|
|
ARG postgres_driver_version=42.2.14
|
|
# Install prerequisities for Ansible
|
|
RUN apt-get update \
|
|
&& apt-get install -y unzip wget \
|
|
&& rm -rf /var/lib/apt/lists/
|
|
|
|
# Install liquibase
|
|
RUN mkdir -p /liqiubase \
|
|
&& wget https://github.com/liquibase/liquibase/releases/download/v${liquibase_version}/liquibase-${liquibase_version}.zip -O /tmp/liquibase.zip \
|
|
&& unzip /tmp/liquibase.zip -d /liquibase
|
|
|
|
RUN mkdir -p /java \
|
|
&& wget https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.tar.gz -O /tmp/java.tar.gz \
|
|
&& tar -xf /tmp/java.tar.gz --strip-components=1 -C /java
|
|
|
|
# Install postgres driver
|
|
RUN mkdir -p /postgres \
|
|
&& wget https://jdbc.postgresql.org/download/postgresql-${postgres_driver_version}.jar -O /postgres/driver.jar
|
|
|
|
# Install ansible and required libraries
|
|
|
|
FROM python:3.7-slim-buster as runtime
|
|
RUN pip3 install --no-cache-dir ansible psycopg2-binary SQLAlchemy lxml
|
|
RUN apt-get update && apt-get install unzip && rm -rf /var/lib/apt/lists/
|
|
COPY --from=base /liquibase /liquibase
|
|
COPY --from=base /postgres /postgres
|
|
COPY --from=base /java /java
|
|
ENV JAVA_HOME=/java/jre
|
|
ADD resources/ /
|
|
RUN chmod +x /deploy.sh
|
|
ENTRYPOINT ["/deploy.sh"] |