Skip to content
F43nd1r edited this page Mar 28, 2024 · 14 revisions

Setup Guide

0. Notes

This is the recommended setup. Acrarium can work with an existing database, your own Tomcat instance or in Standalone mode. If you're not following the recommended setup, you should still read it as information is not duplicated into the other guides.

1. Prerequisites

Install docker and docker-compose. It is helpful to be familiar with these tools.

2. Create compose file

Create a docker-compose.yml file:

version: "3.7"

services:
   database:
       image: mysql:8.3.0
       container_name: database    
       environment:
           MYSQL_ROOT_HOST: '%'
           MYSQL_ROOT_PASSWORD: "[[root_password]]"
           MYSQL_DATABASE: "acrarium"
           MYSQL_USER: "acrarium"
           MYSQL_PASSWORD: "[[secure_password]]"
       expose:
           - "3306"
       volumes:
           - acrarium_data:/var/lib/mysql
       command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci', '--max_allowed_packet=128M', '--log-bin-trust-function-creators']
   acrarium:
       image: f43nd1r/acrarium:next
       container_name: acrarium
       depends_on:
           - database
       ports:
           - 8080:8080
       restart: on-failure
       environment:
           SPRING_DATASOURCE_URL: jdbc:mysql://database:3306/acrarium?useSSL=false&allowPublicKeyRetrieval=true&useLegacyDatetimeCode=false&serverTimezone=UTC
           SPRING_DATASOURCE_USERNAME: "acrarium"
           SPRING_DATASOURCE_PASSWORD: "[[secure_password]]"
    
volumes:
   acrarium_data: 

Replace passwords with your own values. See optional features for more options which can be set as environment variables.

3. Start application

Ensure docker and docker-compose are working, then run

docker-compose up

4. Setup application

Go to localhost:8080 and follow instructions to create your first account. After logging in you will be able to create your first app.