-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (55 loc) · 1.38 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
55
56
57
58
59
60
61
version: '3'
services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "${POSTGRES_PORT}:${POSTGRES_PORT}"
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- my_network
container_name: postgres
backend:
build:
context: ./music-map-express
ports:
- "${BACKEND_PORT}:${BACKEND_PORT}"
volumes:
- ./music-map-express:/app/backend
depends_on:
- postgres
environment:
BACKEND_PORT: ${BACKEND_PORT}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PORT: ${POSTGRES_PORT}
DB_HOST: postgres
JWT_SECRET: ${JWT_SECRET}
networks:
- my_network
container_name: backend
frontend:
build:
context: ./music-map-react
ports:
- "${FRONTEND_PORT}:${FRONTEND_PORT}"
volumes:
- ./music-map-react:/app/frontend
environment:
FRONTEND_PORT: ${FRONTEND_PORT}
BACKEND_PORT: ${BACKEND_PORT}
REACT_APP_GOOGLE_MAPS_API_KEY: ${REACT_APP_GOOGLE_MAPS_API_KEY}
networks:
- my_network
container_name: frontend
volumes:
postgres-data:
networks:
my_network:
driver: bridge