-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
64 lines (61 loc) · 1.88 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
services:
server:
build:
context: .
dockerfile: Dockerfile
image: chaiminwoo0223/albeobsa:latest
container_name: spring-boot-app
restart: on-failure
environment:
JAVA_OPTS: "-Xms2048m -Xmx4096m" # JVM 힙 메모리 크기 설정
DB_JDBC_URL: ${DB_JDBC_URL}
DB_JDBC_USERNAME: ${DB_JDBC_USERNAME}
DB_JDBC_PASSWORD: ${DB_JDBC_PASSWORD}
GOOGLE_AUTHENTICATION_URL: ${GOOGLE_AUTHENTICATION_URL}
GOOGLE_CALLBACK_URL: ${GOOGLE_CALLBACK_URL}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
GOOGLE_REDIRECT_URI: ${GOOGLE_REDIRECT_URI}
GOOGLE_TOKEN_URI: ${GOOGLE_TOKEN_URI}
GOOGLE_USERINFO_URI: ${GOOGLE_USERINFO_URI}
JWT_SECRET: ${JWT_SECRET}
ACCESS_SECOND: ${ACCESS_SECOND}
REFRESH_SECOND: ${REFRESH_SECOND}
ports:
- "8080:8080"
networks:
- albeobsa-network
deploy:
resources:
limits:
memory: 8192M # 컨테이너에 할당된 최대 메모리
cpus: '2.0'
reservations:
memory: 4096M # 컨테이너에 예약된 메모리
cpus: '1.0'
nginx:
image: nginx:latest
restart: always
volumes:
- ./conf/nginx.conf:/etc/nginx/nginx.conf
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
command: /bin/sh -c 'while :; do sleep 6h & wait $$!; nginx -s reload; done & nginx -g "daemon off;"'
ports:
- "80:80"
- "443:443"
depends_on:
- certbot
- server
networks:
- albeobsa-network
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:
albeobsa-network:
driver: bridge