mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
added AccountManager
This commit is contained in:
parent
b35a367ed1
commit
e01a7be08e
@ -42,6 +42,19 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
|
|
||||||
|
account-manager:
|
||||||
|
container_name: DarkFlameAccountManager
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./docker/AccountManager.Dockerfile
|
||||||
|
environment:
|
||||||
|
- DATABASE=${MARIADB_DATABASE:-darkflame}
|
||||||
|
- DATABASE_HOST=database
|
||||||
|
- DATABASE_USER=${MARIADB_USER:-darkflame}
|
||||||
|
- DATABASE_PASSWORD=${MARIADB_PASSWORD:-darkflame}
|
||||||
|
ports:
|
||||||
|
- 5000:5000
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
darkflame:
|
darkflame:
|
||||||
|
|
||||||
|
15
docker/AccountManager.Dockerfile
Normal file
15
docker/AccountManager.Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# 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 && echo "SECRET_KEY = r'$(openssl rand -base64 30)'" >> credentials.py
|
||||||
|
|
||||||
|
EXPOSE 5000
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s \
|
||||||
|
CMD curl -f http://localhost:5000 || exit 1
|
||||||
|
CMD python3 app.py
|
3
docker/credentials_example.py
Normal file
3
docker/credentials_example.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
DB_URL = f'mysql+pymysql://{os.environ["DATABASE_USER"]}:{os.environ["DATABASE_PASSWORD"]}@{os.environ["DATABASE_HOST"]}/{os.environ["DATABASE"]}'
|
3
docker/resources_example.py
Normal file
3
docker/resources_example.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
LOGO = 'logo/logo.png'
|
||||||
|
PRIVACY_POLICY = 'policy/Privacy Policy.pdf'
|
||||||
|
TERMS_OF_USE = 'policy/Terms of Use.pdf'
|
Loading…
Reference in New Issue
Block a user