-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1.06 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
services:
db:
image: mysql
container_name: templates_db
restart: always
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: templates
MYSQL_USER: templates
MYSQL_PASSWORD: templates
volumes:
- templates_db_data:/var/lib/mysql
networks:
- mysql_network
app:
build:
context: .
dockerfile: Dockerfile
args:
- DATABASE_URL=mysql://templates:templates@localhost:3307/templates
container_name: templates_app
restart: always
ports:
- "3030:3000"
depends_on:
- db
environment:
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET}
BETTER_AUTH_URL: "http://localhost:3030" # since we are using the same container
DATABASE_URL: mysql://templates:templates@db/templates
SMTP_HOST: ${SMTP_HOST}
SMTP_PORT: ${SMTP_PORT}
SMTP_USER: ${SMTP_USER}
SMTP_PASS: ${SMTP_PASS}
SMTP_FROM: ${SMTP_FROM}
networks:
- mysql_network
volumes:
templates_db_data:
networks:
mysql_network:
driver: bridge