This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added license fixed docker build behavior
- Loading branch information
1 parent
2e13a3f
commit ac1ee3f
Showing
7 changed files
with
102 additions
and
107 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 |
---|---|---|
@@ -1,103 +1,107 @@ | ||
# # Builder stage | ||
# FROM pypy:3.10 AS builder | ||
# Builder stage | ||
FROM pypy:3.10 AS builder | ||
|
||
# # Install dependencies for Rust and Python build requirements | ||
# RUN apt-get update && apt-get install -y \ | ||
# curl \ | ||
# build-essential \ | ||
# libssl-dev \ | ||
# pkg-config \ | ||
# gcc \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
# Install dependencies for Rust and Python build requirements | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
build-essential \ | ||
libssl-dev \ | ||
pkg-config \ | ||
gcc \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# # Install Rust and Cargo | ||
# RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
# ENV PATH="/root/.cargo/bin:${PATH}" | ||
# RUN rustc --version && cargo --version | ||
# Install Rust and Cargo | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
RUN rustc --version && cargo --version | ||
|
||
# # Set work directory | ||
# WORKDIR /usr/src/app | ||
# Set work directory | ||
WORKDIR /usr/src/app | ||
|
||
# # Upgrade pip and install Python dependencies into a virtual environment | ||
# RUN pip install --upgrade pip | ||
# COPY ./requirements.txt . | ||
# RUN pip install -r requirements.txt | ||
# Upgrade pip and install Python dependencies into a virtual environment | ||
RUN pip install --upgrade pip | ||
COPY ./requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# # Final stage (runtime) | ||
# FROM pypy:3.10 | ||
|
||
# # Set environment variables | ||
# ENV PYTHONDONTWRITEBYTECODE 1 | ||
# ENV PYTHONUNBUFFERED 1 | ||
# Final stage (runtime) | ||
FROM pypy:3.10 | ||
|
||
# # Set work directory | ||
# WORKDIR /usr/src/app | ||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
# Set work directory | ||
WORKDIR /usr/src/app | ||
|
||
# # Install GCC | ||
# RUN apt update && apt install -y gcc | ||
# Install GCC | ||
RUN apt update && apt install -y gcc | ||
|
||
# # Copy installed Python packages from builder stage | ||
# COPY --from=builder /opt/pypy/lib/pypy3.10/ /opt/pypy/lib/pypy3.10/ | ||
# Copy installed Python packages from builder stage | ||
COPY --from=builder /opt/pypy/lib/pypy3.10/ /opt/pypy/lib/pypy3.10/ | ||
COPY --from=builder /opt/pypy/lib/pypy3.10/ /opt/pypy/lib/python3.8/ | ||
# this depends on what you are installing | ||
COPY --from=builder /usr/local/bin /usr/local/bin | ||
|
||
# # Link pypy3 to python | ||
# Link pypy3 to python | ||
# RUN ln -s /usr/local/bin/pypy3 /usr/local/bin/python | ||
|
||
# # Copy project files | ||
# COPY ./src . | ||
# COPY ./start.sh . | ||
# COPY ./celery.sh . | ||
# Copy project files | ||
COPY ./src . | ||
COPY ./start.sh . | ||
COPY ./celery.sh . | ||
|
||
# # RUN pypy3 manage.py collectstatic --noinput | ||
# RUN pypy3 manage.py collectstatic --noinput | ||
|
||
|
||
|
||
FROM pypy:3.10 | ||
# FROM pypy:3.10 | ||
|
||
|
||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
build-essential \ | ||
libssl-dev \ | ||
pkg-config \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
# RUN apt-get update && apt-get install -y \ | ||
# curl \ | ||
# build-essential \ | ||
# libssl-dev \ | ||
# pkg-config \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
RUN rustc --version && cargo --version | ||
# RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
# ENV PATH="/root/.cargo/bin:${PATH}" | ||
# RUN rustc --version && cargo --version | ||
|
||
|
||
# Set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
# # Set environment variables | ||
# ENV PYTHONDONTWRITEBYTECODE 1 | ||
# ENV PYTHONUNBUFFERED 1 | ||
|
||
# Set work directory | ||
WORKDIR /usr/src/app | ||
# # Set work directory | ||
# WORKDIR /usr/src/app | ||
|
||
RUN apt update && apt install gcc | ||
# RUN apt update && apt install gcc | ||
|
||
|
||
# RUN apt-get update && \ | ||
# apt-get install -y --no-install-recommends \ | ||
# build-essential \ | ||
# gcc \ | ||
# libpq-dev \ | ||
# libc-dev \ | ||
# netcat-traditional \ | ||
# && apt-get clean && \ | ||
# rm -rf /var/lib/apt/lists/* | ||
# # RUN apt-get update && \ | ||
# # apt-get install -y --no-install-recommends \ | ||
# # build-essential \ | ||
# # gcc \ | ||
# # libpq-dev \ | ||
# # libc-dev \ | ||
# # netcat-traditional \ | ||
# # && apt-get clean && \ | ||
# # rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
RUN pip install --upgrade pip | ||
COPY ./requirements.txt . | ||
RUN pip install -r requirements.txt | ||
# RUN pip install --upgrade pip | ||
# COPY ./requirements.txt . | ||
# RUN pip install -r requirements.txt | ||
|
||
RUN ln -s /usr/local/bin/pypy3 /usr/local/bin/python | ||
# RUN ln -s /usr/local/bin/pypy3 /usr/local/bin/python | ||
|
||
|
||
# Copy project | ||
COPY ./src . | ||
COPY ./start.sh . | ||
COPY ./celery.sh . | ||
# # Copy project | ||
# COPY ./src . | ||
# COPY ./start.sh . | ||
# COPY ./celery.sh . | ||
|
||
|
||
# RUN pypy3 manage.py collectstatic --noinput | ||
# # RUN pypy3 manage.py collectstatic --noinput |
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,20 @@ | ||
Copyright (c) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
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 |
---|---|---|
|
@@ -44,16 +44,6 @@ We welcome contributions from developers, designers, and anyone interested in im | |
* Submit a pull request to the main repository. | ||
* Ensure your code follows the project's coding standards and guidelines. | ||
|
||
### 3. Translating the Project | ||
|
||
* If you'd like to translate the project into your language, create a new issue on the GitHub issue tracker. | ||
* We'll provide guidance on how to proceed with the translation. | ||
|
||
### 4. Providing Feedback | ||
|
||
* Share your thoughts on the project's features, user experience, and overall direction. | ||
* Create a new issue on the GitHub issue tracker or email us at [insert email]. | ||
|
||
## Getting Started | ||
--------------- | ||
|
||
|
@@ -89,23 +79,4 @@ PRIVY_JWKS_URL="" | |
|
||
``` | ||
docker compose up | ||
``` | ||
|
||
|
||
|
||
## License | ||
------- | ||
|
||
The project is licensed under the MIT License. See the LICENSE file for more information. | ||
|
||
<!-- ## Acknowledgments | ||
--------------- | ||
We'd like to thank the following contributors for their help and support: | ||
* [Insert names] --> | ||
|
||
## Contact Us | ||
------------ | ||
|
||
If you have any questions, suggestions, or feedback, please don't hesitate to contact us at [email protected]. | ||
``` |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
celery -A witswin worker --beat --concurrency 1 -l INFO | ||
pypy3 -m celery -A witswin worker --beat --concurrency 1 -l INFO |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
python manage.py migrate | ||
pypy3 manage.py migrate | ||
|
||
daphne -b 0.0.0.0 -p ${PORT:-5000} witswin.asgi:application | ||
pypy3 -m daphne -b 0.0.0.0 -p ${PORT:-5000} witswin.asgi:application |