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 16, 2024
1 parent 172f8d9 commit f76fcad
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/develop-build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Pull Request on Check
on:
push:
branches: [ "develop" ]
branches: [ "chore/#48-eb-docker-compose" ]

env:
DOCKERHUB_IMAGE_NAME: walwal-server
Expand Down Expand Up @@ -56,14 +56,18 @@ jobs:

- name: Prepare deployment package
run: |
zip -r deployment-package.zip Dockerrun.aws.json
zip -r deployment-package.zip Dockerrun.aws.json docker-compose.yaml
- name: Beanstalk Deploy
uses: einaregilsson/beanstalk-deploy@v22
env:
IMAGE_FULL_URL: ${{ steps.metadata.outputs.tags }}
DOCKERHUB_IMAGE_NAME: ${{ env.DOCKERHUB_IMAGE_NAME }}
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
existing_bucket_name: "walwal-server-dev-deployment"
envs: IMAGE_FULL_URL, DOCKERHUB_IMAGE_NAME # docker-compose.yml 에서 사용할 환경 변수
application_name: "walwal-dev"
environment_name: "Walwal-dev-env"
version_label: "github-action-dev-${{ steps.format-time.outputs.replaced }}"
Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3.8"

services:
backend:
image: ${IMAGE_FULL_URL}
container_name: ${DOCKERHUB_IMAGE_NAME}
restart: always
environment:
- TZ=Asia/Seoul
network_mode: host
env_file:
- .env
redis:
image: "redis:alpine"
container_name: redis
ports:
- "6379:6379"
environment:
- TZ=Asia/Seoul
network_mode: "host"

0 comments on commit f76fcad

Please sign in to comment.