-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (50 loc) · 1.1 KB
/
docker-compose.yml
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
version: '3'
services:
nextjs:
build: ./nextjs
restart: always
depends_on:
- mysql
links:
- mysql
environment:
- PORT=8080
- MYSQL_HOST=mysql
- NEXT_TELEMETRY_DISABLED=1
env_file:
- .env
expose:
- 8080
command: npm run build-start
mysql:
image: mariadb:10.6
restart: always
hostname: mysql
expose:
- 3306
volumes:
- ./db:/var/lib/mysql:rw
- ./db_dump:/docker-entrypoint-initdb.d
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=true
- MYSQL_ROOT_HOST=localhost
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
nginx:
image: nginx:alpine
restart: always
links:
- nextjs
ports:
- 80:80
- 443:443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
certbot:
image: certbot/certbot:arm64v8-latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw