Skip to content

Commit

Permalink
chore: nginx docker-compose.yml 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoya324 committed Aug 12, 2024
1 parent 7f072b3 commit 24c4011
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
22 changes: 4 additions & 18 deletions compose-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,12 @@ services:
image: nginx:latest
container_name: maru-egg-nginx
ports:
- 80:80
- 443:443
volumes:
- ./nginx/:/etc/nginx/
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
- "80:80"
networks:
- maru-egg-local
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"

certbot:
container_name: certbot
image: certbot/certbot
restart: unless-stopped
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
- maru-egg-local

- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- maru-egg-app
networks:
maru-egg-local:
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
maru-egg-app:
container_name: maru-egg-app
image: ${DOCKER_REPO}:${IMAGE_TAG}
image: ${DOCKER_REPO}
ports:
- "8080:8080"
networks:
Expand Down

0 comments on commit 24c4011

Please sign in to comment.