Skip to content

Commit

Permalink
CI : swap memory 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
imenuuu committed Dec 3, 2023
1 parent 7e5b482 commit ad7a7a6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .ebextensions-dev/01_set_up_swap.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
files:
"/home/ec2-user/setup_swap.sh":
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
# based on http://steinn.org/post/elasticbeanstalk-swap/

SWAPFILE=/var/swapfile
SWAP_MEGABYTES=2048

if [ -f $SWAPFILE ]; then
echo "Swapfile $SWAPFILE found, assuming already setup"
exit;
fi

/bin/dd if=/dev/zero of=$SWAPFILE bs=1M count=$SWAP_MEGABYTES
/bin/chmod 600 $SWAPFILE
/sbin/mkswap $SWAPFILE
/sbin/swapon $SWAPFILE

commands:
01setup_swap:
command: "bash setup_swap.sh"
cwd: "/home/ec2-user/"

0 comments on commit ad7a7a6

Please sign in to comment.