-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added frontend and django services in docker
- Loading branch information
1 parent
41b84f3
commit ad71117
Showing
7 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM python:3.10.13-bookworm | ||
|
||
RUN mkdir /opt/scrapy | ||
|
||
WORKDIR /opt/scrapy | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y wget && \ | ||
apt-get clean; | ||
|
||
COPY gensitemap/requirements.txt requirements.txt | ||
COPY gensitemap/scraper/ scraper/ | ||
COPY gensitemap/ui/ ui/ | ||
COPY gensitemap/frontend frontend/ | ||
#COPY gensitemap/ui/entrypoint_django.sh ui/entrypoint_django.sh | ||
RUN pip3 install -r requirements.txt | ||
|
||
# COPY generate-scrapyd.sh generate-scrapyd.sh | ||
CMD [ "python3", "../ui/manage.py", "migrate", "--run-syncdb" ] | ||
WORKDIR /opt/scrapy/ui | ||
# WORKDIR /opt/scrapy/scraper | ||
# SHELL ["/bin/bash", "-c"] | ||
# RUN ../generate-scrapyd.sh | ||
ENTRYPOINT ["/opt/scrapy/ui/entrypoint_django.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM node:20.17 | ||
|
||
RUN mkdir /opt/front | ||
|
||
WORKDIR /opt/front | ||
|
||
COPY gensitemap/frontend frontend | ||
COPY entrypoint_frontend.sh frontend/entrypoint_frontend.sh | ||
|
||
RUN echo "NODE Version:" && node --version | ||
RUN echo "NPM Version:" && npm --version | ||
|
||
WORKDIR /opt/front/frontend | ||
|
||
RUN npm install | ||
|
||
ENTRYPOINT ["/opt/front/frontend/entrypoint_frontend.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cd /opt/front/frontend || exit | ||
|
||
npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
cd /opt/scrapy/ui || exit | ||
|
||
python3 manage.py runserver 0.0.0.0:8000 |