-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.test.yaml
128 lines (123 loc) · 2.68 KB
/
docker-compose.test.yaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
version: '3.5'
services:
backend:
image: docker_backend
#restart: always
# build:
# context: ./backend
# dockerfile: Dockerfile
# volumes:
# - './api:/usr/src/app'
volumes:
- './backend/app:/usr/src/app'
- ./upload:/upload
# networks:
# - backend
# - frontend
# - db
ports:
- 5000:5000
environment:
- FLASK_CONFIG=development
- FLASK_ENV=development
- APP_SETTINGS=project.config.DevelopmentConfig
- DB_USER=postgres
- DB_PASS=postgres
- DB_HOST=db
- DB_DATABASE=test_db
- DB_PORT=5432
- BACKEND_SECRET_KEY="213491278912341234"
- NEXT_PUBLIC_MSAPI_ENDPOINT=http://mikesshop.net
depends_on:
- db
#command: bash -c "ls /usr/src/app"
command: pytest --cov=. tests
#command: bash -c "sleep 7d"
# network: host
# networks:
# - frontend
# test:
# image: docker_test
# build:
# context: ./test
# dockerfile: Dockerfile
# volumes:
# - ./test/app:/usr/src/app
## network: host
# networks:
# - frontend
db:
#restart: always
image: postgres:11.1-alpine
# build:
# context: ./db
# dockerfile: Dockerfile
# networks:
# - frontend
# - db
ports:
- 5432:5432
volumes:
- ./postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
loadbalancer:
image: docker_nginx
build:
context: ./loadbalancer
dockerfile: Dockerfile
restart: unless-stopped
networks:
# - backend
- frontend
ports:
- 80:80
depends_on:
- backend
- frontend
frontend:
image: docker_frontend
restart: always
build:
context: ./frontend
dockerfile: Dockerfile
# volumes:
# - './frontend:/usr/src/app'
# - '/usr/src/app/node_modules'
#command: "bash -c \"npm install ; npm run dev\""
volumes:
- './frontend/app:/usr/src/app'
networks:
- frontend
ports:
- 3000:3000
environment:
- NODE_ENV=development
- REACT_APP_SERVICE_URL=http://localhost:8080
- CHOKIDAR_USEPOLLING=true
- NEXT_TELEMETRY_DISABLED=1
- NEXT_PUBLIC_MSAPI_ENDPOINT=http://backend:5000
depends_on:
- backend
# selenium:
# hostname: selenium
# image: selenium/standalone-firefox:4.1.4-20220427
# ports:
# - 4444:4444
# - 7900:7900
# networks:
# - frontend
# depends_on:
# - frontend
# - backend
# - db
# - nginx
networks:
frontend:
driver: bridge
# name: custom-driver-1
# backend:
# name: custom-driver-2
# db:
# name: custom-driver-3