Start of docker stuff
This commit is contained in:
parent
9c35196867
commit
a78b15aab7
7 changed files with 58 additions and 9 deletions
14
Server/Dockerfile
Normal file
14
Server/Dockerfile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
FROM python:3.13
|
||||
workdir /app2
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get upgrade
|
||||
#RUN apt-get install vlc -y
|
||||
#RUN pip install -r requirements.txt
|
||||
|
||||
# RUN python3 databaseGenerator.py -m new -d /sound
|
||||
|
||||
#CMD ["python3","webbyBits.py"]
|
||||
RUN ls
|
||||
|
|
@ -11,19 +11,21 @@ parser.add_argument('-k','--apikey', help='String: LastFM api key', default="")
|
|||
parser.add_argument('-m', '--mode', help='new/update: Remake database or update current', default= "update")
|
||||
parser.add_argument('-a', '--art', help="True/False: Add art to the database using LastFm (takes minimum 0.25s per song)", default="True")
|
||||
parser.add_argument('-d','--directory',help="Directory of the song files", default="./sound/")
|
||||
parser.add_argument('-b','--database',help="Location of the .db file",default='.')
|
||||
args = parser.parse_args()
|
||||
apikeylastfm = args.apikey
|
||||
if args.directory[-1] == "/" or args.directory[-1] == "\\":
|
||||
soundLocation = args.directory
|
||||
elif "/" in args.directory:
|
||||
soundLocation = args.directory + "/"
|
||||
else:
|
||||
soundLocation = args.directory + "\\"
|
||||
soundLocation = args.directory
|
||||
# if args.directory[-1] == "/" or args.directory[-1] == "\\":
|
||||
# soundLocation = args.directory
|
||||
# elif "/" in args.directory:
|
||||
# soundLocation = args.directory + "/"
|
||||
# else:
|
||||
# soundLocation = args.directory + "\\"
|
||||
# if you want to set the api key/sound directory permenantly for your setup just uncomment the next line
|
||||
# apikeylastfm = "KeyHere"
|
||||
# soundLocation = "directoryHere"
|
||||
songFiles = os.listdir(soundLocation)
|
||||
fileOfDB = sql.connect("songDatabase.db")
|
||||
fileOfDB = sql.connect(args.database+"/songDatabase.db")
|
||||
songDatabase = fileOfDB.cursor()
|
||||
# setting song directory
|
||||
songDatabase.execute("CREATE TABLE IF NOT EXISTS meta (id TEXT PRIMARY KEY, data TEXT);")
|
||||
|
|
|
|||
16
Server/requirements.txt
Normal file
16
Server/requirements.txt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
blinker==1.8.2
|
||||
certifi==2024.2.2
|
||||
charset-normalizer==3.3.2
|
||||
click==8.1.7
|
||||
colorama==0.4.6
|
||||
Flask==3.0.3
|
||||
Flask-Cors==4.0.1
|
||||
idna==3.7
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.4
|
||||
MarkupSafe==2.1.5
|
||||
mutagen==1.47.0
|
||||
python-vlc==3.0.20123
|
||||
requests==2.32.2
|
||||
urllib3==2.2.1
|
||||
Werkzeug==3.0.3
|
||||
|
|
@ -8,9 +8,11 @@ parser=argparse.ArgumentParser(description="Options for the Webby Bits")
|
|||
# this is no longer needed assuming my file works correctly with the generator
|
||||
# parser.add_argument('-d','--directory',help="Directory of the song files (make sure this matches the directory used for the databaseGenerator)", default="./sound/")
|
||||
parser.add_argument('-p','--port',help="Port to host on, not the same as the web (client) port",default='19054')
|
||||
portTheUserPicked=parser.parse_args().port
|
||||
parser.add_argument('-b','--database',help="Location of the .db file",default='.')
|
||||
args = parser.parse_args()
|
||||
portTheUserPicked=args.port
|
||||
|
||||
fileofDB = sql.connect("songDatabase.db")
|
||||
fileofDB = sql.connect(args.database+"/songDatabase.db")
|
||||
songDatabase = fileofDB.cursor()
|
||||
|
||||
#song directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue