AILIXIR Bot commited on
Commit
30eccba
·
1 Parent(s): 75f2278

Auto-sync: 1f46d85c18b728281ff39b07ee714f979d7b6eec

Browse files
Files changed (3) hide show
  1. .env.hf +10 -0
  2. .github/workflows/sync-hf-all.yml +3 -11
  3. Dockerfile +115 -0
.env.hf CHANGED
@@ -35,3 +35,13 @@ CLOUDINARY_API_SECRET=dummy_secret
35
 
36
  # Hugging Face Spaces mode (triggers supervisord)
37
  RUN_MODE=hf
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  # Hugging Face Spaces mode (triggers supervisord)
37
  RUN_MODE=hf
38
+
39
+ # Mail Service
40
+ MAIL_MAILER=smtp
41
+ MAIL_HOST=smtp.gmail.com
42
+ MAIL_PORT=587
43
+ MAIL_USERNAME=yasmeensaleh747@gmail.com
44
+ MAIL_PASSWORD="fghu ijct vhfu xnud"
45
+ MAIL_ENCRYPTION=tls
46
+ MAIL_FROM_ADDRESS=yasmeensaleh747@gmail.com
47
+ MAIL_FROM_NAME="AILIXIR"
.github/workflows/sync-hf-all.yml CHANGED
@@ -55,24 +55,16 @@ jobs:
55
  # Sync files (new, modified, deleted) but preserve the live database
56
  rsync -av --delete --exclude=ai_apps --exclude=.git --exclude=.env --exclude=.dockerignore --exclude=public/imgs --exclude=storage --exclude=Diagrams --exclude=database/ailixir.sqlite "$GITHUB_WORKSPACE/" .
57
  cp "$GITHUB_WORKSPACE/README_HF.md" README.md 2>/dev/null || true
58
- # Write .env with all required environment variables for HF Spaces
 
59
  printf '%s\n' \
60
- 'RUN_MODE=hf' \
61
  'APP_KEY=base64:T/MgQZht16genNJN3aZ5flCuvfe7Zfs4yFhuAFO2itU=' \
62
- 'APP_URL=https://Ailixir-AI-Team-ailixir-api.hf.space' \
63
  'APP_DEBUG=true' \
64
- 'ADMET_AI_URL=https://shdwRow-ailixir-admet.hf.space' \
65
- 'CHEMICAL_AI_URL=https://RottenShadow-ailixir-chemical-rag.hf.space' \
66
- 'DRUG_REPURPOSING_URL=https://RottenShadow-ailixir-drug-repurposing.hf.space' \
67
- 'GENERATION_SERVICE_URL=https://shdwRow-ailixir-generation.hf.space' \
68
  'GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }}' \
69
  'GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }}' \
70
  'GOOGLE_REDIRECT_URI=https://Ailixir-AI-Team-ailixir-api.hf.space/api/user/auth/google' \
71
- 'CLOUDINARY_CLOUD_NAME=dummy_cloud' \
72
- 'CLOUDINARY_API_KEY=dummy_key' \
73
- 'CLOUDINARY_API_SECRET=dummy_secret' \
74
  'QUEUE_CONNECTION=sync' \
75
- > .env
76
  git config user.name "AILIXIR Bot"
77
  git config user.email "bot@ailixir.app"
78
  # Prevent the live database from being tracked/committed
 
55
  # Sync files (new, modified, deleted) but preserve the live database
56
  rsync -av --delete --exclude=ai_apps --exclude=.git --exclude=.env --exclude=.dockerignore --exclude=public/imgs --exclude=storage --exclude=Diagrams --exclude=database/ailixir.sqlite "$GITHUB_WORKSPACE/" .
57
  cp "$GITHUB_WORKSPACE/README_HF.md" README.md 2>/dev/null || true
58
+ # Write .env from .env.hf (single source of truth for all AI service URLs)
59
+ cp "$GITHUB_WORKSPACE/.env.hf" .env
60
  printf '%s\n' \
 
61
  'APP_KEY=base64:T/MgQZht16genNJN3aZ5flCuvfe7Zfs4yFhuAFO2itU=' \
 
62
  'APP_DEBUG=true' \
 
 
 
 
63
  'GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }}' \
64
  'GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }}' \
65
  'GOOGLE_REDIRECT_URI=https://Ailixir-AI-Team-ailixir-api.hf.space/api/user/auth/google' \
 
 
 
66
  'QUEUE_CONNECTION=sync' \
67
+ >> .env
68
  git config user.name "AILIXIR Bot"
69
  git config user.email "bot@ailixir.app"
70
  # Prevent the live database from being tracked/committed
Dockerfile ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ # ============================================================
4
+ # Stage 1: Composer dependencies
5
+ # ============================================================
6
+ FROM composer:2.8 AS vendor
7
+
8
+ WORKDIR /app
9
+
10
+ RUN apk add --no-cache icu-dev libzip-dev oniguruma-dev \
11
+ && docker-php-ext-install intl zip mbstring bcmath pcntl
12
+
13
+ # Add build argument for composer dev dependencies
14
+
15
+ COPY composer.json composer.lock ./
16
+ RUN composer install \
17
+ --no-interaction \
18
+ --no-scripts \
19
+ --prefer-dist \
20
+ --optimize-autoloader
21
+
22
+ COPY . .
23
+ RUN composer dump-autoload --optimize --classmap-authoritative
24
+
25
+ # ============================================================
26
+ # Stage 2: Frontend assets (Vite)
27
+ # ============================================================
28
+ FROM node:22-alpine AS assets
29
+
30
+ WORKDIR /app
31
+
32
+ COPY package.json package-lock.json ./
33
+ RUN npm ci
34
+
35
+ COPY vite.config.js ./
36
+ COPY resources ./resources
37
+ COPY public ./public
38
+
39
+ RUN npm run build
40
+
41
+ # ============================================================
42
+ # Stage 3: Runtime (PHP CLI on Debian — artisan serve)
43
+ # ============================================================
44
+ FROM php:8.3-cli AS runtime
45
+
46
+ RUN apt-get update && apt-get install -y \
47
+ libicu-dev \
48
+ libzip-dev \
49
+ libonig-dev \
50
+ libsqlite3-dev \
51
+ wget \
52
+ bzip2 \
53
+ ca-certificates \
54
+ openbabel \
55
+ supervisor \
56
+ && docker-php-ext-install \
57
+ pdo_sqlite \
58
+ zip \
59
+ intl \
60
+ mbstring \
61
+ bcmath \
62
+ opcache \
63
+ pcntl \
64
+ && rm -rf /var/lib/apt/lists/*
65
+
66
+ COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
67
+
68
+ # Install Miniconda
69
+ ENV CONDA_DIR=/opt/conda
70
+
71
+ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
72
+ /bin/bash /tmp/miniconda.sh -b -p $CONDA_DIR && \
73
+ rm /tmp/miniconda.sh
74
+
75
+ ENV PATH=$CONDA_DIR/bin:$PATH
76
+
77
+ # Accept Anaconda ToS (required in CI/Docker)
78
+ RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
79
+ conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
80
+
81
+ # Create environment
82
+ RUN conda create -y -p /var/www/html/vina_env -c conda-forge \
83
+ vina=1.2.5 \
84
+ python=3.10 \
85
+ pip
86
+
87
+ # Install RDKit via pip to bypass Boost C++ solver compatibility conflicts
88
+ RUN /var/www/html/vina_env/bin/pip install rdkit==2025.09.5
89
+
90
+ # Install testing and service dependencies from requirements.txt
91
+ COPY requirements.txt /tmp/requirements.txt
92
+ RUN /var/www/html/vina_env/bin/pip install -r /tmp/requirements.txt
93
+
94
+ ENV PATH=/var/www/html/vina_env/bin:$PATH
95
+
96
+ WORKDIR /var/www/html
97
+
98
+ COPY --from=vendor --chown=www-data:www-data /app /var/www/html
99
+ COPY --from=assets --chown=www-data:www-data /app/public/build /var/www/html/public/build
100
+
101
+ COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
102
+ COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
103
+ RUN chmod +x /usr/local/bin/entrypoint.sh \
104
+ && mkdir -p storage/framework/{cache,sessions,views} storage/logs bootstrap/cache database \
105
+ && chown -R www-data:www-data storage bootstrap/cache database /var/www/html/vina_env
106
+
107
+ USER www-data
108
+
109
+ EXPOSE 8000 7680
110
+
111
+ HEALTHCHECK --interval=15s --timeout=5s --start-period=40s --retries=5 \
112
+ CMD php -r "exit((int)(@file_get_contents('http://127.0.0.1:8000') === false));"
113
+
114
+ ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
115
+ CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8000"]