fix
This commit is contained in:
parent
daed7bce2a
commit
19f0b952c0
6 changed files with 15 additions and 14 deletions
|
|
@ -62,13 +62,13 @@ jobs:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
COMPONENT="${{ env.COMPONENT }}"
|
COMPONENT="${{ env.COMPONENT }}"
|
||||||
if [ "$COMPONENT" == "web_v2" ]; then
|
if [ "$COMPONENT" = "web_v2" ]; then
|
||||||
cd mnemo_cards_web_v2
|
cd mnemo_cards_web_v2
|
||||||
flutter pub get
|
flutter pub get
|
||||||
elif [ "$COMPONENT" == "backend" ]; then
|
elif [ "$COMPONENT" = "backend" ]; then
|
||||||
cd mnemo_cards_backend
|
cd mnemo_cards_backend
|
||||||
dart pub get
|
dart pub get
|
||||||
elif [ "$COMPONENT" == "common" ]; then
|
elif [ "$COMPONENT" = "common" ]; then
|
||||||
cd mnemo_cards_common
|
cd mnemo_cards_common
|
||||||
dart pub get
|
dart pub get
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ jobs:
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
run: |
|
run: |
|
||||||
git config --global http.postBuffer 524288000
|
git config --global http.postBuffer 524288000
|
||||||
git config --global http.maxRequestBuffer 100M
|
git config --global http.maxRequestBuffer 1000M
|
||||||
git config --global core.compression 0
|
git config --global core.compression 0
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ server {
|
||||||
ssl_prefer_server_ciphers off;
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
# Client upload size limit (for large file uploads)
|
# Client upload size limit (for large file uploads)
|
||||||
client_max_body_size 100M;
|
client_max_body_size 1000M;
|
||||||
|
|
||||||
# Security headers
|
# Security headers
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,10 @@ RUN sudo apt-get update && sudo apt-get install -y \
|
||||||
&& sudo rm -rf /var/lib/apt/lists/*
|
&& sudo rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Cursor CLI
|
# Install Cursor CLI
|
||||||
RUN curl https://cursor.com/install -fsS | bash \
|
RUN curl https://cursor.com/install -fsS | bash
|
||||||
&& mv /root/.local/bin/cursor-agent /usr/local/bin/cursor-agent \
|
|
||||||
&& chmod +x /usr/local/bin/cursor-agent
|
# Add Cursor to PATH
|
||||||
|
ENV PATH="/root/.local/bin:${PATH}"
|
||||||
|
|
||||||
# Verify installations
|
# Verify installations
|
||||||
RUN python3 --version && \
|
RUN python3 --version && \
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ set -e
|
||||||
|
|
||||||
SERVER_IP="147.45.152.129"
|
SERVER_IP="147.45.152.129"
|
||||||
SERVER_USER="root"
|
SERVER_USER="root"
|
||||||
MAX_SIZE="100M"
|
MAX_SIZE="1000M"
|
||||||
|
|
||||||
echo "🔧 Fixing nginx upload limit (413 error) on server..."
|
echo "🔧 Fixing nginx upload limit (413 error) on server..."
|
||||||
|
|
||||||
|
|
@ -20,10 +20,10 @@ ssh "$SERVER_USER@$SERVER_IP" << 'EOF'
|
||||||
# Update global nginx config
|
# Update global nginx config
|
||||||
if ! grep -q "client_max_body_size" /etc/nginx/nginx.conf; then
|
if ! grep -q "client_max_body_size" /etc/nginx/nginx.conf; then
|
||||||
echo "Adding client_max_body_size to global nginx config..."
|
echo "Adding client_max_body_size to global nginx config..."
|
||||||
sed -i '/http {/a\ client_max_body_size 100M;' /etc/nginx/nginx.conf
|
sed -i '/http {/a\ client_max_body_size 1000M;' /etc/nginx/nginx.conf
|
||||||
else
|
else
|
||||||
echo "Updating existing client_max_body_size in global config..."
|
echo "Updating existing client_max_body_size in global config..."
|
||||||
sed -i 's/client_max_body_size.*$/client_max_body_size 100M;/' /etc/nginx/nginx.conf
|
sed -i 's/client_max_body_size.*$/client_max_body_size 1000M;/' /etc/nginx/nginx.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update all site configs in sites-available
|
# Update all site configs in sites-available
|
||||||
|
|
@ -42,7 +42,7 @@ ssh "$SERVER_USER@$SERVER_IP" << 'EOF'
|
||||||
/\}/ && in_server { in_server=0 }
|
/\}/ && in_server { in_server=0 }
|
||||||
{ print }
|
{ print }
|
||||||
/server_name/ && in_server && !added {
|
/server_name/ && in_server && !added {
|
||||||
print " client_max_body_size 100M;"
|
print " client_max_body_size 1000M;"
|
||||||
added=1
|
added=1
|
||||||
}
|
}
|
||||||
' "$conf" > "$conf.tmp" && mv "$conf.tmp" "$conf"
|
' "$conf" > "$conf.tmp" && mv "$conf.tmp" "$conf"
|
||||||
|
|
@ -60,7 +60,7 @@ ssh "$SERVER_USER@$SERVER_IP" << 'EOF'
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "📊 Summary:"
|
echo "📊 Summary:"
|
||||||
echo " - client_max_body_size set to 100M globally"
|
echo " - client_max_body_size set to 1000M globally"
|
||||||
echo " - All site configurations updated"
|
echo " - All site configurations updated"
|
||||||
echo " - Git push should now work without 413 errors"
|
echo " - Git push should now work without 413 errors"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ server {
|
||||||
ssl_prefer_server_ciphers off;
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
# Client upload size limit (for large file uploads)
|
# Client upload size limit (for large file uploads)
|
||||||
client_max_body_size 100M;
|
client_max_body_size 1000M;
|
||||||
|
|
||||||
# Security headers
|
# Security headers
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue