Skip to content

Commit

Permalink
[Bug] Update Docker Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnsugyeong committed May 15, 2024
1 parent eeacf28 commit 8808dbc
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 24 deletions.
21 changes: 21 additions & 0 deletions .ebextensions-dev/02-ebs-extend.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .ebextensions/01-ebs-extend.config
commands:
01_mount_tmpfs:
command: "sudo mount -o size=10M,rw,nodev,nosuid -t tmpfs tmpfs /tmp"

02_grow_partition:
command: "sudo growpart /dev/nvme0n1 1"
ignoreErrors: true

03_resize_filesystem:
command: |
if [ "$(lsblk -f | grep nvme0n1p1 | awk '{print $2}')" = "xfs" ]; then
sudo xfs_growfs /
else
sudo resize2fs /dev/nvme0n1p1
fi
ignoreErrors: true

04_unmount_tmpfs:
command: "sudo umount /tmp"
ignoreErrors: true
2 changes: 1 addition & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Generate deployment package
run: |
mkdir -p deploy/.platform/nginx/conf.d
cp docker-compose.yml deploy/docker-compose.yml
cp Dockerrun.aws.dev.json deploy/Dockerrun.aws.json
cp -r .ebextensions-dev deploy/.ebextensions
cp .platform/nginx/conf.d/proxy-dev.conf deploy/.platform/nginx/conf.d/proxy.conf
cd deploy && zip -r deploy.zip .
Expand Down
24 changes: 12 additions & 12 deletions .platform/nginx/conf.d/proxy-dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ server {
}

location /ws/chat {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";

proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_connect_timeout 60s;
}
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_connect_timeout 60s;
}
}
13 changes: 13 additions & 0 deletions Dockerrun.aws.dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"AWSEBDockerrunVersion": "1",
"Image": {
"Name": "471112861132.dkr.ecr.ap-northeast-2.amazonaws.com/waggle-dev:latest",
"Update": "true"
},
"Ports": [
{
"ContainerPort": "8080",
"HostPort": "8080"
}
]
}
11 changes: 0 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
version: '3.8'
services:
app:
image: 471112861132.dkr.ecr.ap-northeast-2.amazonaws.com/waggle-dev
ports:
- "8080:8080"
depends_on:
- kafka
- redis
- mongo
env_file:
- .env

kafka:
image: wurstmeister/kafka:latest
ports:
Expand Down

0 comments on commit 8808dbc

Please sign in to comment.