Merge pull request #1 from VBMCBoy/main

Add Brick-Building-Fix and AccountManager
This commit is contained in:
Nils Bergmann 2021-12-07 22:28:37 +01:00 committed by GitHub
commit 157977e267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 1 deletions

View File

@ -3,4 +3,6 @@ CLIENT_PATH=/Users/someuser/LEGO Universe
# Can improve build time
BUILD_THREADS=10
# Updates NET_VERSION in CMakeVariables.txt
BUILD_VERSION=171023
BUILD_VERSION=171023
# make sure this is a long random string
ACCOUNT_MANAGER_SECRET=

View File

@ -34,6 +34,44 @@ services:
depends_on:
- database
brickbuildfix:
container_name: DarkFlameBrickBuildFix
networks:
- darkflame
build:
context: .
dockerfile: ./docker/brickfix.Dockerfile
ports:
- 80:80
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 2m
timeout: 3s
retries: 3
start_period: 40s
account-manager:
container_name: DarkFlameAccountManager
networks:
- darkflame
build:
context: .
dockerfile: ./docker/AccountManager.Dockerfile
environment:
- DATABASE=${MARIADB_DATABASE:-darkflame}
- DATABASE_HOST=database
- DATABASE_USER=${MARIADB_USER:-darkflame}
- DATABASE_PASSWORD=${MARIADB_PASSWORD:-darkflame}
- ACCOUNT_SECRET=${ACCOUNT_MANAGER_SECRET:?err}
ports:
- 5000:5000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000"]
interval: 2m
timeout: 3s
retries: 3
start_period: 40s
networks:
darkflame:

View File

@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1
FROM python:3.9.9-buster
WORKDIR /usr/local/share/
RUN git clone https://github.com/DarkflameUniverse/AccountManager
WORKDIR AccountManager
ADD docker/credentials_example.py credentials.py
ADD docker/resources_example.py resources.py
RUN pip3 install -r requirements.txt
EXPOSE 5000
CMD python3 app.py

View File

@ -0,0 +1,5 @@
# syntax=docker/dockerfile:1
FROM python:3.9.9-slim
WORKDIR /empty_dir
EXPOSE 80
CMD python -m http.server 80

View File

@ -0,0 +1,4 @@
import os
DB_URL = f'mysql+pymysql://{os.environ["DATABASE_USER"]}:{os.environ["DATABASE_PASSWORD"]}@{os.environ["DATABASE_HOST"]}/{os.environ["DATABASE"]}'
SECRET_KEY = os.environ["ACCOUNT_SECRET"]

View File

@ -0,0 +1,3 @@
LOGO = 'logo/logo.png'
PRIVACY_POLICY = 'policy/Privacy Policy.pdf'
TERMS_OF_USE = 'policy/Terms of Use.pdf'