Download Dockerfile from vanducdev/botzalo: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/spaces/vanducdev/botzalo/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/vanducdev/botzalo/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/vanducdev/botzalo/resolve/main/Dockerfile
1.49 kB
| FROM node:18.20.4 | |
| WORKDIR /app | |
| ENV FFMPEG_PATH=/usr/bin/ffmpeg | |
| ENV FFPROBE_PATH=/usr/bin/ffprobe | |
| RUN apt-get update && apt-get install -y \ | |
| mariadb-server \ | |
| python3 \ | |
| python-is-python3 \ | |
| make \ | |
| g++ \ | |
| ffmpeg \ | |
| git \ | |
| curl \ | |
| wget \ | |
| ca-certificates \ | |
| libcairo2-dev \ | |
| libpango1.0-dev \ | |
| libjpeg-dev \ | |
| libgif-dev \ | |
| librsvg2-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY package*.json ./ | |
| COPY scripts ./scripts | |
| RUN npm install && node scripts/fix-nsfwjs.mjs | |
| COPY . . | |
| RUN mkdir -p /app/assets/temp /run/mysqld /var/run/mysqld \ | |
| && chown -R mysql:mysql /run/mysqld /var/run/mysqld /var/lib/mysql | |
| RUN cat > /app/start.sh << 'EOF' | |
| #!/bin/bash | |
| set -e | |
| mkdir -p /run/mysqld /var/run/mysqld /app/assets/temp | |
| chown -R mysql:mysql /run/mysqld /var/run/mysqld /var/lib/mysql | |
| mysqld_safe --datadir=/var/lib/mysql --bind-address=127.0.0.1 & | |
| sleep 10 | |
| mysql -uroot <<SQL | |
| CREATE DATABASE IF NOT EXISTS \`bot-zalo-venom\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
| CREATE USER IF NOT EXISTS 'bot'@'127.0.0.1' IDENTIFIED BY 'bot123'; | |
| CREATE USER IF NOT EXISTS 'bot'@'localhost' IDENTIFIED BY 'bot123'; | |
| GRANT ALL PRIVILEGES ON \`bot-zalo-venom\`.* TO 'bot'@'127.0.0.1'; | |
| GRANT ALL PRIVILEGES ON \`bot-zalo-venom\`.* TO 'bot'@'localhost'; | |
| FLUSH PRIVILEGES; | |
| SQL | |
| if [ -f /app/nph-update.sql ]; then | |
| mysql -uroot bot-zalo-venom < /app/nph-update.sql || true | |
| fi | |
| npm start | |
| EOF | |
| RUN chmod +x /app/start.sh | |
| EXPOSE 7860 | |
| CMD ["/app/start.sh"] |