-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yaml
53 lines (48 loc) · 1.47 KB
/
docker-compose.prod.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
version: "3.9"
services:
db:
image: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: nextjs
MYSQL_DATABASE: habit_tracker
TZ: Europe/Warsaw
volumes:
- mysql:/var/lib/mysql
migrate:
build:
context: .
target: db-migrator
environment:
DATABASE_URL: mysql://root:nextjs@db:3306/habit_tracker?connection_timeout=300
depends_on:
- db
app:
platform: "linux/amd64"
build:
context: .
working_dir: /app
networks: [ proxy, default ]
image: habit-tracker
depends_on:
- db
environment:
DATABASE_URL: mysql://root:nextjs@db:3306/habit_tracker
NEXT_PUBLIC_API_URL: https://habit.plgn.xyz
labels:
traefik.enable: true
traefik.http.routers.habit_tracker.entrypoints: http
traefik.http.routers.habit_tracker.rule: Host(`habit.plgn.xyz`)
traefik.http.middlewares.habit_tracker-https-redirect.redirectscheme.scheme: https
traefik.http.routers.habit_tracker.middlewares: habit_tracker-https-redirect
traefik.http.routers.habit_tracker-secure.entrypoints: https
traefik.http.routers.habit_tracker-secure.rule: Host(`habit.plgn.xyz`)
traefik.http.routers.habit_tracker-secure.tls: true
traefik.http.routers.habit_tracker-secure.service: habit_tracker
traefik.http.services.habit_tracker.loadbalancer.server.port: 3000
traefik.docker.network: proxy
volumes:
mysql: ~
networks:
proxy:
external: true