Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/stacksDockerDeployProduction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ jobs:
source: "amp-client/dist"
target: "/home/${{ secrets.EC2_USER }}/"

- name: Copy Database Low Memory cofiguration file to EC2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Fix typo in step name

Fix typo: change 'cofiguration' to 'configuration'.

Suggested change
- name: Copy Database Low Memory cofiguration file to EC2
- name: Copy Database Low Memory configuration file to EC2

uses: appleboy/scp-action@v1
with:
host: ${{ secrets.EC2_HOST_PRODUCTION }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_KEY }}
source: "mysql-lowmem.cnf"
target: "/home/${{ secrets.EC2_USER }}/"

- name: Deploy on S3 bucket
uses: appleboy/ssh-action@v1
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/stacksDockerDeployStaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ jobs:
source: "docker-compose.yaml"
target: "/home/${{ secrets.EC2_USER }}/"

- name: Copy Database Low Memory cofiguration file to EC2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Fix typo in step name

Also correct 'cofiguration' to 'configuration' here.

Suggested change
- name: Copy Database Low Memory cofiguration file to EC2
- name: Copy Database Low Memory configuration file to EC2

uses: appleboy/scp-action@v1
with:
host: ${{ secrets.EC2_HOST_STAGING }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_KEY }}
source: "mysql-lowmem.cnf"
target: "/home/${{ secrets.EC2_USER }}/"

Deploy-To-EC2:
needs:
[
Expand Down
6 changes: 6 additions & 0 deletions amp-laravel/dockerShell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ else
fi

php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan config:cache
php artisan route:cache
php artisan view:cache

php artisan migrate --seed --force
apache2-foreground
15 changes: 13 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,34 @@ services:
- mysql-database
restart: always
command: ./dockerShell.sh
mem_limit: 300m
cpus: 0.35

mysql-database:
image: mysql:8.0
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: placeholder
MYSQL_DATABASE: placeholder
volumes:
- mysql-data:/var/lib/mysql
ports:
- 3306:3306
- ./mysql-lowmem.cnf:/etc/mysql/conf.d/custom.cnf
mem_limit: 400m
cpus: 0.40



node-server:
image: riyadmurad44/node_amp_intelligence:latest
ports:
- 3001:3001
restart: always
environment:
- NODE_OPTIONS=--max-old-space-size=128
mem_limit: 150m
cpus: 0.25

volumes:
mysql-data:
7 changes: 7 additions & 0 deletions mysql-lowmem.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[mysqld]
key_buffer_size = 8M
innodb_buffer_pool_size = 64M
query_cache_size = 4M
max_connections = 30
thread_cache_size = 4
table_open_cache = 32
Loading