If you want to set up a production ready VPS, there are a few steps you should take.
This document goes through the list of steps that I personally take.
# Log in as root
Solution that I've found:
Create project from template this way:
npx react-native@latest init myawesomeproject --version 0.74.5 --pm npm --install-pods falseWhen project is created, install pods the way you usually do it, for example: cd ios && arch -x86_64 pod install for mac with m1 CPU
P.S. I guess --install-pods false is the point there, but feel free to explore deeper
docker exec -i your_pg_container_name /bin/bash -c "PGPASSWORD=your_pg_password pg_dump --username your_pg_username your_database_name" > /desired/path/on/your/machine/dump.sqlfor example
docker exec -i 48b0930423ee /bin/bash -c "PGPASSWORD=mylocalpass pg_dump --username postgres db_test_1" > my_db_dump.sql| version: '3.6' | |
| networks: | |
| proxy: | |
| driver: overlay | |
| attachable: true | |
| name: proxy | |
| services: | |
| traefik: |
| FROM node:18-alpine AS base | |
| LABEL author="masb0ymas" | |
| # Install dependencies only when needed | |
| FROM base AS deps | |
| # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
| RUN apk add --no-cache libc6-compat | |
| WORKDIR /app | |
| # Install dependencies based on the preferred package manager |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE |
| sudo apt-get update | |
| sudo apt-get install ca-certificates curl gnupg lsb-release | |
| sudo mkdir -p /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
| sudo nginx -t | |
| sudo ln -s /etc/nginx/sites-available/example /etc/nginx/sites-enabled | |
| sudo service nginx restart | |
| sudo systemctl restart nginx | |
| // Khusus laravel | |
| // Cara 1 : | |
| sudo chown -R www-data:www-data /var/www/html/MyProject/ | |
| sudo chmod -R 755 /var/www/html/MyProject/ | |
| php artisan storage:link |