Commit 0187480a authored by Pinon Gregory's avatar Pinon Gregory 🦉
Browse files

ajout docker compose et autres sous parties du projet

parent d2a64268
#TODO: Change 127.0.0.1 to db-ignite
DB_URL=172.17.0.1:10800
DB_URL=127.0.0.1:10800
DB_USER=ignite
DB_PASSWORD=oemcs2
DEFAULT_USER=admin
DEFAULT_PASSWORD=admin
JWT_SECRET=D94AD7C66DA6FE86FD91D478DF2AC
\ No newline at end of file
JWT_SECRET=D94AD7C66DA6FE86FD91D478DF2AC
-----BEGIN CERTIFICATE-----
MIIDWzCCAkOgAwIBAgIUTFuHWosLDMYJMwXaN//JSMwo2kAwDQYJKoZIhvcNAQEL
BQAwPTELMAkGA1UEBhMCRlIxDzANBgNVBAgMBkZyYW5jZTEPMA0GA1UEBwwGUmVu
bmVzMQwwCgYDVQQKDANZV0MwHhcNMjIwMzIxMTUyOTU1WhcNMjIwNDIwMTUyOTU1
WjA9MQswCQYDVQQGEwJGUjEPMA0GA1UECAwGRnJhbmNlMQ8wDQYDVQQHDAZSZW5u
ZXMxDDAKBgNVBAoMA1lXQzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AJ94X3w077/NKDV73YhUMjsZfl/zXueO8wi164iov+7LTzCDd03P9O1M52wj5AYo
n0Ql2STr15cKR1SI+PpvmTW2Oa8jdTH3+nRkqVPKa7/2I6fLGT/g2HhpYGOdfH4J
HGGodXrlgICj7/Wf8TyypFTvgNFc93O67Di+U/B7wBVfsafsELEwA0eqNtEqp0qJ
Lg6iy4wF9TCVwkfKc8ycyfmQIWfjvon4zJa3ijlt6dNzSx12iTSwHs/UqSNzx9l+
RiPvGRpKt1zyupHYf3f2nw4/PtqAP2pNbjEp/al4+0hAKvt7PkdGiHk/pkrZBjt2
73H9CnMxIjJu6cQD7VQzBw0CAwEAAaNTMFEwHQYDVR0OBBYEFGVhvd9d4K2hGDxN
E28IfLJ7r5/HMB8GA1UdIwQYMBaAFGVhvd9d4K2hGDxNE28IfLJ7r5/HMA8GA1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LxiMz
Dk/nGIfR89vaaxCiJEuH8YyFWeCE+Gi9bvwawAJj4+nZ9Dm0n7mqfnMx0SX8tlkY
vuGrzwwHiX1RtKqRPkV00hcOWC0bj6suW0ppPouh90ECgYEA05jvTj9K0HOyFob2
ExKQpgxxV4sjpaLqnzX8xZH4SQ72ahNT4g9B3dvIFGXBMabS6lNsYc+8yYSTNbNe
ArI4b/tf7itbi+vdRdruSbM4Mo4IiBu7p+yPhexzIV4A/H3rn5yi1gEoTJ3rXJXu
0VrS2TflBzgxb+H18LbNxQqPOyUCgYEAwO8m/Vk6ZHjvXrOY91EYyqpas8fG9IG4
T59YkAeIzoriMlfyvWsjFBwmVuuM29YNNl/S1pKmI7ungKFpW23K9foRl+a7RLdi
CDvKT1TYVOmrgca/2czRnmNNTuFWl7YEpfYP7tdYRFa4ZYeKZJXRPaSo+4SWb7cf
nrx8ppR3C8kCgYAB8zrhYbvyx94wTvYdnuIuZZb105Z0hFfdN8Yom/vJ0JV8zMjN
II7e2JOzfGyXZI41EqfBDwUSZmJk8E5BgBr9DTgJHeUuGPJlHmtryncOIDj76CWG
mquH9HHrMM6ZhR+SzQLDLieM7TeqFseorkmbLuSxeFccTNzTZxvmYP6I8QKBgQCs
0Mrc3iLmwkivTDH1Pef2CPer14PHmbZNY88BXC5Xy6FnNM4SizflmH1jGCSY+bfl
/5ksaDl3Amy8VFi587N79x3xMVSG7bha5auGudn43UGpwiww3DzbIdmqkT9uLzUk
ry6AYtYGiKMtFmaJSIUfMTHH8XCK6r3hAraow42KuQKBgCUn0x4lBFBGEK1EKqKz
1lmruXO4cI27lQmD2H6t/4wcBeXG61HyO+ALP/Ac+kNT92TMURjsChbrSbv9v0ue
ssQKuaN1DmyZnZLzbzqweVf+63pmmymrubb7aYcZ7Xofptokp/Fq9fJwfWEZRkG5
48v4q7OBBoomglh9NooUqniL
-----END PRIVATE KEY-----
version: "3.7"
services:
db:
image: ywc/database
ports:
- "10800:10800"
backend:
build: backend-supervision
image: ywc/backend
ports:
- "3000:3000"
depends_on:
- "db"
socket:
build: socket-position
image: ywc/socket
ports:
- "3001:3001"
depends_on:
- "db"
frontend:
build: frontend-supervision
image: ywc/frontend
ports:
- "81:80"
depends_on:
- "socket"
- "backend"
# notification:
# build: notification-server
# image: gaetanbrmd/notification
# ports:
# - "3002:3000"
proxy:
build: proxy-supervision
image: ywc/proxy
ports:
- "80:80"
- "443:443"
secrets :
- source : nginx_key
target : /etc/nginx/nginx.key
- source : nginx_cert
target : /etc/nginx/nginx.crt
depends_on:
- "backend"
- "frontend"
# TODO : Database feeder sur chaque Raspi (arguments env)
secrets :
nginx_key :
file : ./certs/nginx.key
nginx_cert :
file : ./certs/nginx.crt
*.py
__pycache__
\ No newline at end of file
FROM node:12
WORKDIR /app
COPY package*.json ./
COPY *.py ./
RUN npm install
RUN apt-get update
RUN apt-get install -y python3 python3-pip
RUN pip3 install numpy
COPY . .
CMD [ "node", "index.js" ]
\ No newline at end of file
{
"meters_per_pixels": 0.04051724110732491,
"scales": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
102.00747,
55.305255
],
[
282.671301,
55.305255
]
]
},
"properties": {
"meters": 7.32
}
}
]
},
"balises": {
"type": "FeatureCollection",
"features": []
},
"doors": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
286.440252,
133.388081
],
[
287.095721,
161.901012
]
]
},
"properties": {
"exit_1": [
262.84334315648533,
146.82520914476987
],
"exit_2": [
315.280917851046,
147.80841367029288
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
240.229639,
184.514716
],
[
265.792957,
184.514716
]
]
},
"properties": {
"exit_1": [
254.64997211046023,
155.01858019079498
],
"exit_2": [
253.66676758493722,
203.19560194142258
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
97.992718,
181.565102
],
[
123.228301,
181.565102
]
]
},
"properties": {
"exit_1": [
109.13570233305438,
151.08576208870292
],
"exit_2": [
110.11890685857739,
197.9518444719665
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
294.633623,
185.825655
],
[
323.474289,
185.825655
]
]
},
"properties": {
"exit_1": [
310.36489522343095,
157.31272408368199
],
"exit_2": [
311.02036490711293,
201.88466257405855
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
281.524229,
184.842451
],
[
281.524229,
222.531958
]
]
},
"properties": {
"exit_1": [
260.2214644217573,
202.86786709958156
],
"exit_2": [
314.297713325523,
206.47295035983262
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
441.131097,
182.876042
],
[
466.36668,
182.876042
]
]
},
"properties": {
"exit_1": [
455.5514301589958,
155.34631503263597
],
"exit_2": [
452.27408174058576,
207.12842004351464
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
473.904581,
184.842451
],
[
496.190551,
185.825655
]
]
},
"properties": {
"exit_1": [
486.03077045020916,
151.08576208870292
],
"exit_2": [
487.9971795012552,
198.93504899748953
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
533.224588,
182.548307
],
[
560.754314,
184.842451
]
]
},
"properties": {
"exit_1": [
549.6113297673639,
152.39670145606692
],
"exit_2": [
548.628125241841,
201.22919289037654
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
754.117871,
184.186981
],
[
779.681189,
184.842451
]
]
},
"properties": {
"exit_1": [
769.5214086426778,
152.39670145606692
],
"exit_2": [
769.1936738008368,
202.21239741589957
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
785.744283,
183.531511
],
[
807.456717,
183.531511
]
]
},
"properties": {
"exit_1": [
797.6246713305434,
155.2643813221756
],
"exit_2": [
796.3956656736395,
203.6052704937237
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
942.23767,
182.302506
],
[
967.637121,
182.302506
]
]
},
"properties": {
"exit_1": [
952.4793841004177,
152.80637000836808
],
"exit_2": [
958.6244123849366,
202.37626483681993
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
596.887081,
223.269361
],
[
634.166919,
223.269361
]
]
},
"properties": {
"exit_1": [
615.322165556485,
197.86991076150613
],
"exit_2": [
614.0931598995811,
252.7654967698743
]
}
},
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
597.296749,
343.711915
],
[
634.166919,
342.073241
]
]
},
"properties": {
"exit_1": [
615.322165556485,
310.5287626443512
],
"exit_2": [
616.1415026610874,
360.0986574728031
]
}
}
]
},
"rooms": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
100.0,
52.0
],
[
284.0,
51.0
],
[
284.0,
184.0
],
[
97.0,
182.0
]
]
},
"properties": {
"room_type": "Chambre",
"room_name": "114",
"room_center_case": [
31,
19
],
"room_center": [
195.34518828451883,
121.89539748953975
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
287.0,
184.0
],
[
289.0,
52.0
],
[
469.0,
52.0
],
[
472.0,
184.0
]
]
},
"properties": {
"room_type": "Chambre",
"room_name": "118",
"room_center_case": [
63,
20
],
"room_center": [
389.1276150627615,
123.4581589958159
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
472.0,
184.0
],
[
470.0,
52.0
],
[
534.0,
52.0
],
[
536.0,
184.0
]
]
},
"properties": {
"room_type": "Restaurant",
"room_name": "",
"room_center_case": [
83,
19
],
"room_center": [
511.0230125523013,
118.76987447698745
]
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
536.0,
182.0
],
[
532.0,