mirror of
https://github.com/chenyme/grok2api.git
synced 2026-12-05 08:01:07 +00:00
fix: remove nginx, restore imagine_fast selects, clean up docker-compose
- Remove nginx service and nginx/ directory (not in main branch) - Restore imagine_fast size/response_format select inputs - Revert grok2api to ports: 8000:8000 (direct expose) - Remove dev-testing source mounts from docker-compose - Restore warp port to 1080
This commit is contained in:
3 files changed
+25
-48
No files matched your search
@@ -461,6 +461,22 @@ function buildFieldCard(section, key, val) {
|
||||
{ val: 'url', text: 'URL' }
|
||||
]);
|
||||
}
|
||||
else if (section === 'imagine_fast' && key === 'size') {
|
||||
built = buildSelectInput(section, key, val, [
|
||||
{ val: '1024x1024', text: '1024x1024 (1:1)' },
|
||||
{ val: '1280x720', text: '1280x720 (16:9)' },
|
||||
{ val: '720x1280', text: '720x1280 (9:16)' },
|
||||
{ val: '1792x1024', text: '1792x1024 (3:2)' },
|
||||
{ val: '1024x1792', text: '1024x1792 (2:3)' }
|
||||
]);
|
||||
}
|
||||
else if (section === 'imagine_fast' && key === 'response_format') {
|
||||
built = buildSelectInput(section, key, val, [
|
||||
{ val: 'url', text: 'URL' },
|
||||
{ val: 'b64_json', text: 'B64 JSON' },
|
||||
{ val: 'base64', text: 'Base64' }
|
||||
]);
|
||||
}
|
||||
else if (Array.isArray(val) || typeof val === 'object') {
|
||||
built = buildJsonInput(section, key, val);
|
||||
}
|
||||
|
||||
+9
-20
@@ -2,8 +2,8 @@ services:
|
||||
grok2api:
|
||||
container_name: grok2api
|
||||
image: ghcr.io/chenyme/grok2api:latest
|
||||
expose:
|
||||
- "8000"
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
LOG_LEVEL: INFO
|
||||
@@ -14,12 +14,15 @@ services:
|
||||
# FLARESOLVERR_URL: http://flaresolverr:8191
|
||||
# CF_REFRESH_INTERVAL: "600"
|
||||
# CF_TIMEOUT: "60"
|
||||
|
||||
# SERVER_STORAGE_TYPE: (local, redis, mysql, pgsql) default: local
|
||||
# SERVER_STORAGE_URL: (local mode is empty) default: empty
|
||||
# Redis: redis://localhost:6379/0 or redis://:password@localhost:6379/0
|
||||
# MySQL: mysql+aiomysql://user:pass@localhost/db
|
||||
# PgSQL: postgresql+asyncpg://user:pass@localhost/db
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
- ./logs:/app/logs
|
||||
- ./config.defaults.toml:/app/config.defaults.toml:ro
|
||||
- ./main.py:/app/main.py:ro
|
||||
- ./app:/app/app:ro
|
||||
restart: unless-stopped
|
||||
|
||||
warp:
|
||||
@@ -27,26 +30,12 @@ services:
|
||||
image: caomingjun/warp:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:1180:1080"
|
||||
- "127.0.0.1:1080:1080"
|
||||
environment:
|
||||
- WARP_SLEEP=2
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
|
||||
nginx:
|
||||
container_name: nginx-proxy
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ./nginx/conf/default.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./nginx/certs:/etc/nginx/certs:ro
|
||||
depends_on:
|
||||
- grok2api
|
||||
restart: unless-stopped
|
||||
|
||||
flaresolverr:
|
||||
container_name: flaresolverr
|
||||
image: ghcr.io/flaresolverr/flaresolverr:latest
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
upstream grok2api {
|
||||
server grok2api:8000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 8000;
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://grok2api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# SSE / streaming support
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_read_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection '';
|
||||
chunked_transfer_encoding on;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user