1
0
Fork 0
mirror of https://github.com/mia-0/0x0.git synced 2026-01-23 07:49:19 +00:00

added dockerfile, docker-compose and config.py

This commit is contained in:
thebigbone 2022-11-22 09:43:50 +05:30
parent b5f0cfdf6f
commit 882fd66ad6
3 changed files with 23 additions and 0 deletions

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM ubuntu:latest
RUN apt update -y && apt install python3 python3-pip sqlite3 libmagic-dev -y
COPY . /data
WORKDIR /data
RUN pip3 install flask
RUN pip3 install -r requirements.txt
RUN sed -i "s|FHOST_USE_X_ACCEL_REDIRECT = True|FHOST_USE_X_ACCEL_REDIRECT = False |g" fhost.py
CMD ["touch","flask.db"]
RUN FLASK_APP=fhost flask db upgrade
EXPOSE 5000
CMD ["flask","--app","fhost.py","run","-h","0.0.0.0"]

10
docker-compose.yml Normal file
View file

@ -0,0 +1,10 @@
version: "3.8"
services:
file_hosting:
image: vector450/0x0:latest
container_name: '0x0'
restart: unless-stopped
ports:
- 5000:5000

2
instance/config.py Normal file
View file

@ -0,0 +1,2 @@
SQLALCHEMY_DATABASE_URI = 'sqlite:////data/flask.db'