Skip to content

Commit

Permalink
chore: docker compose 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
char-yb committed Jul 17, 2024
1 parent e017600 commit 4112641
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/develop-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,21 @@ jobs:
replace-with: '-'
flags: 'g'

- name: Generate deployment package
- name: Prepare deployment package
run: |
mkdir -p deploy/nginx/conf.d
cp Dockerrun.aws.json deploy/Dockerrun.aws.json
cp nginx/default.conf deploy/nginx/conf.d/default.conf
cd deploy && zip -r deploy.zip .
zip -r deployment-package.zip docker-compose.yaml nginx/default.conf
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v21
uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
existing_bucket_name: "walwal-server-dev-deployment"
application_name: "walwal-dev"
environment_name: "Walwal-dev-env"
version_label: "walwal-dev-${{ github.sha }}"
region: ap-northeast-2
deployment_package: deploy/deploy.zip
deployment_package: deployment-package.zip

# Slack 알림
- name: Send Deploy Result to Slack
Expand Down
2 changes: 1 addition & 1 deletion Dockerrun.aws.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Ports": [
{
"ContainerPort": 8080,
"HostPort": 8080
"HostPort": 5000
}
]
}
17 changes: 17 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
version: "3.8"

services:
backend:
image: "olderstonebed/walwal-server:latest"
container_name: "walwal-server"
restart: always
environment:
- TZ=Asia/Seoul
network_mode: host
env_file:
- .env
redis:
image: "redis:alpine"
container_name: redis
Expand All @@ -9,3 +18,11 @@ services:
environment:
- TZ=Asia/Seoul
network_mode: "host"
nginx:
image: "nginx:alpine"
container_name: nginx
environment:
- TZ=Asia/Seoul
network_mode: host
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/elasticbeanstalk-nginx-docker-upstream.conf

0 comments on commit 4112641

Please sign in to comment.