fix: use Python ask.py instead of Rust binary to avoid compilation
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
ask/target
|
ask/target
|
||||||
|
ask/src
|
||||||
.git
|
.git
|
||||||
*.md
|
*.md
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -28,14 +28,8 @@ ENV PATH="/root/.cargo/bin:${PATH}" \
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY basedosdados.duckdb Caddyfile start.sh auth.py ./
|
COPY basedosdados.duckdb Caddyfile start.sh auth.py ask.py ./
|
||||||
COPY ask/ ./ask/
|
RUN chmod +x start.sh
|
||||||
RUN cd ask && /root/.cargo/bin/cargo build --release && \
|
|
||||||
mv target/release/ask /app/ask && \
|
|
||||||
rm -rf target && \
|
|
||||||
file /app/ask && \
|
|
||||||
ldd /app/ask || true
|
|
||||||
RUN chmod +x start.sh /app/ask
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|||||||
@@ -695,7 +695,7 @@ fn draw_content(f: &mut Frame, app: &mut App, area: Rect) {
|
|||||||
// Status bar
|
// Status bar
|
||||||
f.render_widget(
|
f.render_widget(
|
||||||
Paragraph::new(format!(
|
Paragraph::new(format!(
|
||||||
"✓ gen: {} consulta: {} {} linha(s)",
|
"✓ gerar SQL: {} consulta: {} {} resultado(s)",
|
||||||
gen_s, run_s, n
|
gen_s, run_s, n
|
||||||
))
|
))
|
||||||
.style(Style::default().fg(Color::Green)),
|
.style(Style::default().fg(Color::Green)),
|
||||||
|
|||||||
2
start.sh
2
start.sh
@@ -22,7 +22,7 @@ echo "[start] Starting ttyd terminal (db)..."
|
|||||||
ttyd --port 7681 --writable duckdb -readonly --init /app/ssh_init.sql /app/basedosdados.duckdb &
|
ttyd --port 7681 --writable duckdb -readonly --init /app/ssh_init.sql /app/basedosdados.duckdb &
|
||||||
|
|
||||||
echo "[start] Starting ttyd terminal (ask)..."
|
echo "[start] Starting ttyd terminal (ask)..."
|
||||||
ttyd --port 7682 --writable /app/ask &
|
ttyd --port 7682 --writable python3 /app/ask.py &
|
||||||
|
|
||||||
echo "[start] Starting auth service..."
|
echo "[start] Starting auth service..."
|
||||||
python3 /app/auth.py &
|
python3 /app/auth.py &
|
||||||
|
|||||||
Reference in New Issue
Block a user