Skip to content

Commit

Permalink
chore: Dockerfile 및 docker-compose 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
miseongk committed Jul 16, 2024
1 parent 7c969ab commit fd182c4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM amazoncorretto:17-alpine

COPY build/libs/*.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar"]
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.8'

services:
nginx:
container_name: nginx
image: nginx:latest
ports:
- "80:80"
- "443:443"
volumes:
- /etc/nginx/conf.d/${secrets.SERVER_NGINX_CONF}:/etc/nginx/conf.d/${secrets.SERVER_NGINX_CONF}
- /etc/letsencrypt:/etc/letsencrypt
depends_on:
- springboot

springboot:
container_name: springboot
image: ${secrets.DOCKER_USERNAME}/bottles
ports:
- "8080:8080"
depends_on:
- mysql

db:
container_name: mysql
image: mysql
restart: always
ports:
- "3306:3306"
environment:
TZ: Asia/Seoul
MYSQL_ROOT_PASSWORD: ${secrets.DB_PASSWORD}
MYSQL_DATABASE: ${secrets.DB_DATABASE}
MYSQL_USER: ${secrets.DB_USER_NAME}
MYSQL_PASSWORD: ${secrets.DB_PASSWORD}
volumes:
- ./data/mysql/:/var/lib/mysql
- ./db/mysql/config:/etc/mysql/conf.d

0 comments on commit fd182c4

Please sign in to comment.