-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (45 loc) · 1.06 KB
/
Copy pathdocker-compose.yml
File metadata and controls
49 lines (45 loc) · 1.06 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
version: "3.8"
services:
db:
image: postgres:15-alpine
container_name: pokemon_db
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
backend:
build:
context: ./pokemon-api
dockerfile: Dockerfile
container_name: pokemon_backend
ports:
- "3000:3000"
environment:
- POSTGRES_HOST=db
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${POSTGRES_DB}
- JWT_SECRET=${JWT_SECRET}
depends_on:
- db
restart: unless-stopped
frontend:
build:
context: ./pokemon-fe
dockerfile: Dockerfile
container_name: pokemon_frontend
ports:
- "5173:5173"
environment:
- VITE_API_URL=http://backend:3000
depends_on:
- backend
restart: unless-stopped
volumes:
postgres_data: