-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (91 loc) · 2.7 KB
/
docker-compose.yml
File metadata and controls
96 lines (91 loc) · 2.7 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
84
85
86
87
88
89
90
91
92
93
94
95
96
services:
postgres:
image: postgres:15-alpine
container_name: study-planner-postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-study_planner}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- study-planner-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: study-planner-backend
restart: unless-stopped
user: "${UID:-1000}:${GID:-1000}"
ports:
- "3000:3000"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-study_planner}?schema=public
PORT: 3000
NODE_ENV: development
BACKEND_URL: http://localhost:3000
FRONTEND_URL: http://localhost:5173
MERCADOPAGO_BACK_URL: https://horasliquidas.com.br
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-5bMpeQmYI3f9NUyzvNyUIvJ1iInuXuP2riMu//DQcj8=}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-your-google-client-id}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-your-google-client-secret}
MERCADOPAGO_ACCESS_TOKEN: ${MERCADOPAGO_ACCESS_TOKEN:-}
MERCADOPAGO_PUBLIC_KEY: ${MERCADOPAGO_PUBLIC_KEY:-}
MERCADOPAGO_WEBHOOK_SECRET: ${MERCADOPAGO_WEBHOOK_SECRET:-}
volumes:
- ./backend:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
networks:
- study-planner-network
command: sh -c "npx prisma generate && npm run start:dev"
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: study-planner-frontend
restart: unless-stopped
user: "${UID:-1000}:${GID:-1000}"
ports:
- "5173:5173"
environment:
PUBLIC_API_BASE_URL: ""
DOCKER_ENV: "true"
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
networks:
- study-planner-network
ngrok:
image: ngrok/ngrok:latest
container_name: study-planner-ngrok
restart: unless-stopped
environment:
NGROK_AUTHTOKEN: ${NGROK_AUTHTOKEN}
command: start --all --config /etc/ngrok.yml --log stdout
ports:
- "4040:4040" # ngrok web interface para ver as URLs
volumes:
- ./ngrok.yml:/etc/ngrok.yml:ro
depends_on:
- backend
- frontend
networks:
- study-planner-network
volumes:
postgres_data:
networks:
study-planner-network:
driver: bridge