diff --git a/mealie/docker-compose.yml b/mealie/docker-compose.yml new file mode 100644 index 0000000..634629b --- /dev/null +++ b/mealie/docker-compose.yml @@ -0,0 +1,82 @@ +services: + mealie: + image: ghcr.io/mealie-recipes/mealie:v3.9.2 + container_name: mealie + restart: always + ports: + - "9925:9000" + environment: + # Set Backend ENV Variables Here + ALLOW_SIGNUP: "false" + PUID: 1000 + PGID: 1000 + TZ: America/New_York + SMTP_HOST: smtp.gmail.com + SMTP_PORT: 587 + SMTP_FROM_NAME: Mealie Help + SMTP_AUTH_STRATEGY: TLS + SMTP_FROM_EMAIL: help@adamhome.io + SMTP_USER_FILE: /run/secrets/smtp-user + SMTP_PASSWORD_FILE: /run/secrets/smtp-password + BASE_URL: https://recipes.adamhome.io + # Database Settings + DB_ENGINE: postgres + POSTGRES_USER_FILE: /run/secrets/db_user + POSTGRES_PASSWORD_FILE: /run/secrets/db_password + POSTGRES_SERVER_FILE: /run/secrets/server + POSTGRES_PORT_FILE: /run/secrets/port + POSTGRES_DB_FILE: /run/secrets/db_name + volumes: + - ./data:/app/data/ + secrets: + - db_name + - db_password + - db_user + - port + - server + - smtp-password + - smtp-user + deploy: + resources: + limits: + memory: 1000M + depends_on: + postgres: + condition: service_healthy + + postgres: + container_name: mealie-postgres + image: docker.io/postgres:17.10 + restart: always + environment: + POSTGRES_PASSWORD_FILE: /run/secrets/db_password + POSTGRES_USER_FILE: /run/secrets/db_user + PGUSER_FILE: /run/secrets/db_user + POSTGRES_DB_FILE: /run/secrets/db_name + volumes: + - ./postgres:/var/lib/postgresql/data + secrets: + - db_name + - db_password + - db_user + healthcheck: + test: ["CMD", "pg_isready"] + interval: 30s + timeout: 20s + retries: 3 + +secrets: + db_name: + file: secrets/db_name.txt + db_password: + file: secrets/db_password.txt + db_user: + file: secrets/db_user.txt + port: + file: secrets/port.txt + server: + file: secrets/server.txt + smtp-password: + file: ./secrets/smtp_password.txt + smtp-user: + file: ./secrets/smtp_user.txt diff --git a/setup.sh b/setup.sh index e28e137..8f70f22 100755 --- a/setup.sh +++ b/setup.sh @@ -36,4 +36,11 @@ if [ -d "immich" ]; then cd .. fi +if [ -d "mealie" ]; then + cd mealie + echo "Attempting to start mealie container ..." + $PROG compose -f docker-compose.yml up -d + cd .. +fi + echo "Program finished successfully!" \ No newline at end of file