File tree Expand file tree Collapse file tree 5 files changed +44
-2
lines changed
Expand file tree Collapse file tree 5 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,15 @@ jobs:
103103 source : " amp-client/dist"
104104 target : " /home/${{ secrets.EC2_USER }}/"
105105
106+ - name : Copy Database Low Memory cofiguration file to EC2
107+ uses : appleboy/scp-action@v1
108+ with :
109+ host : ${{ secrets.EC2_HOST_PRODUCTION }}
110+ username : ${{ secrets.EC2_USER }}
111+ key : ${{ secrets.EC2_KEY }}
112+ source : " mysql-lowmem.cnf"
113+ target : " /home/${{ secrets.EC2_USER }}/"
114+
106115 - name : Deploy on S3 bucket
107116 uses : appleboy/ssh-action@v1
108117 with :
Original file line number Diff line number Diff line change @@ -141,6 +141,15 @@ jobs:
141141 source : " docker-compose.yaml"
142142 target : " /home/${{ secrets.EC2_USER }}/"
143143
144+ - name : Copy Database Low Memory cofiguration file to EC2
145+ uses : appleboy/scp-action@v1
146+ with :
147+ host : ${{ secrets.EC2_HOST_STAGING }}
148+ username : ${{ secrets.EC2_USER }}
149+ key : ${{ secrets.EC2_KEY }}
150+ source : " mysql-lowmem.cnf"
151+ target : " /home/${{ secrets.EC2_USER }}/"
152+
144153 Deploy-To-EC2 :
145154 needs :
146155 [
Original file line number Diff line number Diff line change 2323fi
2424
2525php artisan config:clear
26+ php artisan cache:clear
27+ php artisan route:clear
28+ php artisan view:clear
2629php artisan config:cache
30+ php artisan route:cache
31+ php artisan view:cache
32+
2733php artisan migrate --seed --force
2834apache2-foreground
Original file line number Diff line number Diff line change @@ -13,23 +13,34 @@ services:
1313 - mysql-database
1414 restart : always
1515 command : ./dockerShell.sh
16+ mem_limit : 300m
17+ cpus : 0.35
1618
1719 mysql-database :
1820 image : mysql:8.0
1921 restart : always
22+ ports :
23+ - 3306:3306
2024 environment :
2125 MYSQL_ROOT_PASSWORD : placeholder
2226 MYSQL_DATABASE : placeholder
2327 volumes :
2428 - mysql-data:/var/lib/mysql
25- ports :
26- - 3306:3306
29+ - ./mysql-lowmem.cnf:/etc/mysql/conf.d/custom.cnf
30+ mem_limit : 400m
31+ cpus : 0.40
32+
33+
2734
2835 node-server :
2936 image : riyadmurad44/node_amp_intelligence:latest
3037 ports :
3138 - 3001:3001
3239 restart : always
40+ environment :
41+ - NODE_OPTIONS=--max-old-space-size=128
42+ mem_limit : 150m
43+ cpus : 0.25
3344
3445volumes :
3546 mysql-data :
Original file line number Diff line number Diff line change 1+ [mysqld]
2+ key_buffer_size = 8M
3+ innodb_buffer_pool_size = 64M
4+ query_cache_size = 4M
5+ max_connections = 30
6+ thread_cache_size = 4
7+ table_open_cache = 32
You can’t perform that action at this time.
0 commit comments