forked from xgeekshq/split
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
115 lines (107 loc) · 2.61 KB
/
docker-compose.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
version: "3.9"
services:
backend:
container_name: backend
restart: unless-stopped
build:
context: backend
dockerfile: Dockerfile
target: development
command: npm run start:dev
ports:
- 3200:3200
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- /app/node_modules
networks:
- split-network
depends_on:
- mongo
frontend:
container_name: frontend
restart: unless-stopped
build:
context: frontend
dockerfile: Dockerfile
target: development
command: npm run dev
ports:
- 3000:3000
env_file:
- ./frontend/.env
volumes:
- ./frontend:/app
- /app/node_modules
networks:
- split-network
depends_on:
- backend
mongo2:
container_name: mongo2
image: mongo
restart: always
command: "bash -c '/usr/bin/mongod --replSet $${MONGO_REPLICA_NAME} --journal --bind_ip_all'"
ports:
- "27018:27017"
env_file:
- ./database/.env
networks:
- split-network
mongo:
container_name: mongo
image: mongo
restart: always
command: "bash -c '/usr/bin/mongod --replSet $${MONGO_REPLICA_NAME} --journal --bind_ip_all'"
ports:
- "27017:27017"
env_file:
- ./database/.env
links:
- mongo2
volumes:
- ./database/rs-init.sh:/scripts/rs-init.sh
networks:
- split-network
redis:
container_name: redis
image: redis
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASSWORD"
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- '6379:6379'
env_file:
- ./database/redis/.env
azurite:
container_name: azurite
image: mcr.microsoft.com/azure-storage/azurite
ports:
- '${FORWARD_AZURITE_BLOB_PORT:-10000}:10000'
command: azurite-blob --blobHost 0.0.0.0 --disableProductStyleUrl
volumes:
- azurite:/data
networks:
- split-network
depends_on:
- azurite-init
azurite-init:
image: curlimages/curl:7.87.0
entrypoint:
- /bin/sh
- -c
- |
echo "Waiting for Azurite to start..."
while ! nc -z azurite 10000; do sleep 1; done
curl --request PUT \
--url 'http://azurite:10000/devstoreaccount1/split-images?restype=container&sv=2021-10-04&ss=btqf&srt=sco&st=2022-12-14T16%3A22%3A03Z&se=2119-01-15T16%3A22%3A00Z&sp=rwdxftlacup&sig=uXt%2FXqfK1iFnNeDP60UD1CwJueWVoADE9gOLqkkI3NM%3D' \
--header 'x-ms-blob-public-access: blob'
networks:
- split-network
networks:
split-network:
driver: bridge
volumes:
azurite:
driver: local