Skip to content

Commit

Permalink
remove config
Browse files Browse the repository at this point in the history
  • Loading branch information
hwalker928 committed Nov 18, 2024
1 parent d7dcc2c commit b1a532b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
12 changes: 0 additions & 12 deletions config.json.example

This file was deleted.

6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ services:
web:
image: ghcr.io/hwalker928/secretsanta:latest
environment:
REROLL_ENABLED: true
ADMIN_USER: Harry
VALID_NAMES: alice,ben,charlie,david
BUDGET: 10

REROLL_ENABLED: true

MYSQL_DATABASE: secretsanta
MYSQL_USER: santa
MYSQL_PASSWORD: SantasLittleHelper2024
MYSQL_HOST: db
depends_on:
- db
volumes:
- ./config.json:/usr/src/app/config.json
ports:
- "5000:5000"
restart: on-failure
Expand Down
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from flask import Flask, render_template, redirect, request, jsonify
from flask import Flask, render_template, redirect, jsonify
import mysql.connector
import random
import logging
import os
import datetime

# Configure logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
Expand All @@ -13,6 +14,8 @@
"reroll_enabled": os.getenv("REROLL_ENABLED", "true").lower() == "true",
"admin_user": os.getenv("ADMIN_USER", "admin"),
"names": os.getenv("VALID_NAMES", "").split(","),
"year": os.getenv("YEAR", datetime.datetime.now().year),
"budget": os.getenv("BUDGET", "10")
}

app = Flask(__name__)
Expand Down

0 comments on commit b1a532b

Please sign in to comment.