forked from Taker-Academy/Spotiflyx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (53 loc) · 1.22 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
services:
db:
image: postgres:latest
container_name: spotiflyx_database
env_file:
- path: ./backend/.env
required: true
environment:
POSTGRES_ROOT_PASSWORD: ${MDP_DB}
POSTGRES_DATABASE: ${USER_DB}
POSTGRES_USER: ${USER_DB}
POSTGRES_PASSWORD: ${MDP_DB}
volumes:
- ./db.sql:/docker-entrypoint-initdb.d/schema.sql
networks:
- spotiflyx_network
backend:
build: ./backend
container_name: spotiflyx_backend
env_file:
- path: ./backend/.env
required: true
environment:
DATABASE_URL: mariadb://${USER_DB}:${MDP_DB}@spotiflyx_database/spotiflyx
CRYPT_TOK: ${CRYPT_TOK}
C_YTB_API: ${C_YTB_API}
CLIENT_ID: ${CLIENT_ID}
CLIENT_SECRET: ${CLIENT_SECRET}
volumes:
- .:/app/backend
ports:
- "8080:8080"
command: npm start
depends_on:
- db
networks:
- spotiflyx_network
frontend:
build: ./front/spotiflyx
container_name: spotiflyx_frontend
ports:
- "3000:3000"
command: npm run dev
depends_on:
- backend
networks:
- spotiflyx_network
networks:
spotiflyx_network:
driver: bridge
attachable: true
volumes:
spotiflyx_db_data: