-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (69 loc) · 1.95 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (69 loc) · 1.95 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
services:
flyway:
env_file: ./.env
network_mode: "host"
image: flyway/flyway
command: -url=${MYSQLDB_URL} -schemas=${MYSQLDB_DATABASE} -user=${MYSQLDB_USER} -password=${MYSQLDB_ROOT_PASSWORD} -placeholderReplacement="false" -locations="filesystem:/flyway/sql" -connectRetries=60 migrate
volumes:
- ./src/main/resources/db/migration:/flyway/sql
depends_on:
- mysqldb
mysqldb:
container_name: "critter-mysql"
image: mariadb:11
restart: on-failure
ports:
- "3306:3306"
env_file: ./.env
environment:
MYSQL_ROOT_PASSWORD: $MYSQLDB_ROOT_PASSWORD
MYSQL_PASSWORD: $MYSQLDB_ROOT_PASSWORD
MYSQL_USER: $MYSQLDB_USER
MYSQL_DATABASE: $MYSQLDB_DATABASE
volumes:
- db_data:/var/lib/mysql
mailhog:
container_name: "critter-mailhog"
image: mailhog/mailhog:latest
ports:
- "8025:8025"
- "1025:1025"
app:
build: .
container_name: CCapp #CodeCrittersApp
depends_on:
- flyway
restart: on-failure
env_file: ./.env
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://mysqldb:3306/$MYSQLDB_DATABASE?useSSL=false
- SPRING_DATASOURCE_USERNAME=$MYSQLDB_USER
- SPRING_DATASOURCE_PASSWORD=$MYSQLDB_ROOT_PASSWORD
- SPRING_JPA_HIBERNATE_DDL_AUTO=none
- BASE_API_URL=$BASE_API
stdin_open: true
tty: true
tmpfs:
- /tmp
- /temp
nginx:
image: nginx:stable-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./config/nginx:/etc/nginx/conf.d
- ./config/certbot/conf:/etc/letsencrypt
- ./config/certbot/www:/var/www/certbot
depends_on:
- app
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./config/certbot/conf:/etc/letsencrypt
- ./config/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 24h & wait $${!}; done;'"
volumes:
db_data: