forked from team-HF/HF_backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (80 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
83 lines (80 loc) · 2.2 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
spring:
build: .
image: spring:latest
container_name: spring-container
ports:
- "8080:8080"
environment:
- SPRING_PROFILES_ACTIVE=prod,secret,constants,priv
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_REGION=${AWS_REGION}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_SQS_ALARM_QUEUE_URL=${AWS_SQS_ALARM_QUEUE_URL}
- REDIS_HOST=redis://redis-container:6379
- JDBC_URL=${JDBC_URL}
- JDBC_USERNAME=${JDBC_USERNAME}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- S3_BUCKET=${S3_BUCKET}
- KAKAO_CLIENT_ID=${KAKAO_CLIENT_ID}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
networks:
- app-network
- hf-net
depends_on:
redis:
condition: service_started
redis:
image: redis:latest
container_name: redis-container
ports:
- "6379:6379"
networks:
- app-network
nginx:
image: nginx:latest
container_name: nginx-container
ports:
- "80:80"
- "443:443"
volumes:
- /home/ubuntu/app/nginx/conf.d:/etc/nginx/conf.d
- /home/ubuntu/app/nginx/certbot/www:/var/www/certbot
- /home/ubuntu/app/nginx/certbot/conf:/etc/letsencrypt
depends_on:
- spring
networks:
- app-network
- hf-net
certbot:
image: certbot/certbot
container_name: certbot-container
volumes:
- /home/ubuntu/app/nginx/certbot/www:/var/www/certbot
- /home/ubuntu/app/nginx/certbot/conf:/etc/letsencrypt
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do sleep 6h & wait $${!}; certbot renew --webroot -w /var/www/certbot --quiet; done'"
networks:
- app-network
# mysql:
# image: mysql:8.0.40
# container_name: mysql-container
# ports:
# - "3306:3306"
# - "33060:33060"
# environment:
# - MYSQL_ROOT_PASSWORD=1111
# - MYSQL_DATABASE=hf
# networks:
# - app-network
# healthcheck:
# test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "--password=1111"]
# interval: 10s
# timeout: 30s
# retries: 5
# start_period: 10s
networks:
app-network:
driver: bridge
hf-net:
external: true