Skip to content

Commit adff2ba

Browse files
fix CORS issue and yaml issue (stitionai#593)
1 parent 6acce21 commit adff2ba

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

devika.dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ ENV PATH="/home/nonroot/devika/.venv/bin:$HOME/.cargo/bin:$PATH"
2020
RUN $HOME/.cargo/bin/uv venv
2121
COPY requirements.txt /home/nonroot/devika/
2222
RUN UV_HTTP_TIMEOUT=100000 $HOME/.cargo/bin/uv pip install -r requirements.txt
23+
2324
RUN playwright install-deps chromium
25+
RUN playwright install chromium
2426

2527
COPY src /home/nonroot/devika/src
2628
COPY config.toml /home/nonroot/devika/
29+
COPY sample.config.toml /home/nonroot/devika/
2730
COPY devika.py /home/nonroot/devika/
2831
RUN chown -R nonroot:nonroot /home/nonroot/devika
2932

3033
USER nonroot
3134
WORKDIR /home/nonroot/devika
3235
ENV PATH="/home/nonroot/devika/.venv/bin:$HOME/.cargo/bin:$PATH"
3336
RUN mkdir /home/nonroot/devika/db
34-
RUN playwright install chromium
3537

3638
ENTRYPOINT [ "python3", "-m", "devika" ]

devika.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626

2727

2828
app = Flask(__name__)
29-
CORS(app, resources={r"/*": {"origins": ["https://localhost:3000"]}}) # Change the origin to your frontend URL
29+
CORS(app, resources={r"/*": {"origins": # Change the origin to your frontend URL
30+
[
31+
"https://localhost:3000",
32+
"http://localhost:3000",
33+
]}})
3034
app.register_blueprint(project_bp)
3135
socketio.init_app(app)
3236

0 commit comments

Comments
 (0)