Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jacks pull req #20

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MONGODB_URL_test = mongodb://localhost:27017/mern
MONGODB_URL_test = mongodb://mongo:27017/mern

ACCESS_TOKEN_SECRET = itissecret

Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:16
WORKDIR /app
COPY package*.json ./
RUN npm install
RUN npm install -g nodemon
COPY . .
EXPOSE 8080
CMD ["npm", "run", "dev"]
11 changes: 11 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:16 AS build
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . /usr/src/app
RUN npm run build
EXPOSE 3000
CMD ["npm", "start", "build"]


8 changes: 4 additions & 4 deletions client/src/utils/imageUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const imageUpload = async (images) => {
}


formData.append("upload_preset", "ADD VALUE HERE");
formData.append("cloud_name", "ADD VALUE HERE");
formData.append("upload_preset", "wxefrcgm");
formData.append("cloud_name", "dxnp8nlyj");

const res = await fetch("ADD CLOUDINARY IMAGE UPLOAD LINK HERE", {
const res = await fetch("https://api.cloudinary.com/v1_1/dxnp8nlyj/image/upload", {
method: "POST",
body: formData
})
Expand All @@ -41,4 +41,4 @@ export const imageUpload = async (images) => {

}
return imgArr;
}
}
61 changes: 61 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
services:
frontend:
container_name: frontend
build:
context: ./client
restart: always
ports:
- "3000:3000"

backend:
container_name: backend
restart: always
build:
context: .
env_file:
- .env
ports:
- "8080:8080"
depends_on:
- mongo

mongo:
container_name: mongo
image: mongo:latest
restart: always
ports:
- "27017:27017"
volumes:
- mongodb-data:/data/db

mongo-express:
container_name: mongo-express
image: mongo-express
restart: always
depends_on:
- mongo
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_MONGODB_ADMINUSERNAME: ""
ME_CONFIG_MONGODB_ADMINPASSWORD: ""

proxy:
container_name: proxy
image: nginx
ports:
- "80:80"
- "443:443"
depends_on:
- frontend
- backend
- mongo-express
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl/localhost.crt:/etc/ssl/certs/localhost.crt
- ./ssl/localhost.key:/etc/ssl/private/localhost.key

volumes:
mongodb-data:
7 changes: 7 additions & 0 deletions domains.ext
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = fake1.local
67 changes: 67 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
worker_processes 1;

events { worker_connections 1024; }

http {

server {
listen 80;
server_name localhost;

location / {
return 301 https://$host$request_uri;
}
}


server {
listen 443 ssl;
server_name localhost;


ssl_certificate /etc/ssl/certs/localhost.crt;
ssl_certificate_key /etc/ssl/private/localhost.key;


location / {
proxy_pass http://frontend:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}


location /api/ {
proxy_pass http://backend:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}


location /mongo-express/ {
proxy_pass http://mongo-express:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

location /socket.io/ {
proxy_pass http://backend:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

if ($scheme = http) {
return 301 https://$host$request_uri;
}
}
}
28 changes: 28 additions & 0 deletions privkey.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDNMdX+NCGCvPtp
0uB84V10W5NL1qb3M7AJanJI/GS2po9Av+1zw6bGfAVudVcLVDGWY4URBVY4le4m
rAZ/H2EAvBpPD+J2759hl+TevDd+mO7QD+JDPEyylfYUG/RTqmT0CppltMaGv5er
xQNWw+tYDE/G6By+N4s5r9AbTA82N3UGUu0ygs6i6qVSaFhKdEhNIj6vXFgiYalQ
TTGKrNzpu1MOFIjjhNy1JiCyVaI9w/qI5dsfbqo5HYcQOUn+o0yMiztVtamkLkNp
m7O5uQzZLqUx7Narf2OrTsrrGsrbMQ8x5X7xyMhAqBZ0tQE5ZO1NRMoJpHUzINIi
SgF3H9lpAgMBAAECggEAAPuUfqqNgAirbBTzWAnExrBDFvWE2HF+Dfd9a2HREipf
TIQ2zQuCdpgktwQXGgHp2GJq4ltcD7qRGMyRXeW+s1ATUK5e62qnoOInOZVdbyzo
lOTElMWayO6srmk5XPa3k88isOrCGiZcAbm4c7+Ntp7deXKG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RIVATE KEY-----
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ app.use('/api', require('./routes/messageRouter'));
//#endregion


const URI = process.env.MONGODB_URL;
const URI = process.env.MONGODB_URL_test;
mongoose.connect(URI, {
useCreateIndex:true,
useFindAndModify:false,
Expand All @@ -55,4 +55,4 @@ mongoose.connect(URI, {
const port = process.env.PORT || 8080;
http.listen(port, () => {
console.log("Listening on ", port);
});
});
19 changes: 19 additions & 0 deletions ssl/RootCA.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDJTCCAg2gAwIBAgIUPpenadYACzc6Fj9cUkAa0LFElxMwDQYJKoZIhvcNAQEL
BQAwIjELMAkGA1UEBhMCVVMxEzARBgNVBAMMCk15LVJvb3QtQ0EwHhcNMjQwOTAx
MDUxMDQyWhcNMjcwNjIyMDUxMDQyWjAiMQswCQYDVQQGEwJVUzETMBEGA1UEAwwK
TXktUm9vdC1DQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJr+i+me
Dt1FMzvg7qLAXaQKqQDXUmjwtsZSCVCVmrUHinXYSlLSVnNwwo95JDaXxzNQ9rd9
spw0f9cFezzMO4JjjfXsq/+14d8XCtYQh9wzB+cS/JcEUKG3vnR3QSC3wN1ABtLN
P+GTWnl8J0HcLOnHjeN7myusYwXW9O0KzUHnuRhSsU/bCBwAeGT1IUNdGOVqtRZo
IRdxlBHJULgJNlhdmJlVlF8yRhbjKWMFza60eHWrdDQGIy2QdpLKhWAkH/zsV2hO
+hHG82R8Pss+Zexb2TMFbNyvuYemtAPaHnAexgZd+5r6YvZVNnQd6FJu0oQ+7anE
QM1MEddwCwP0obcCAwEAAaNTMFEwHQYDVR0OBBYEFDDYChB1y3h190w6HcZjUi5e
rdg9MB8GA1UdIwQYMBaAFDDYChB1y3h190w6HcZjUi5erdg9MA8GA1UdEwEB/wQF
MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAGHirty221WnTaBw4zAON/6Gh+pcHshK
HQWHrRpNFe+FstcIh8nLlG+medAaahjwxen/AbRW6V1kXTEoUnG2sGw55Z6jXuNC
OinLqqrLjoFC/ncaENw5nOgqDtIdMtk8ExsVhbV14EAv/8F8OSvD/985BIpCbmIK
crQ8csv+b8oVvCdtcKeUPSyImCLbLl33Tc6gs4jRlUnUHVo3SQMzBDTB4KrKQt0u
61sANW19P5yR6vQEyRqIiP8dhkxnNdiHGKeKMNjliLkjGCFzMIEsXJV5MztpYnRu
i1DTMiH6sulXkxclw15FltqtHpYAgpgbUWXAbQa6XPxYFtyHCcxr6ko=
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions ssl/RootCA.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCa/ovpng7dRTM7
4O6iwF2kCqkA11Jo8LbGUglQlZq1B4p12EpS0lZzcMKPeSQ2l8czUPa3fbKcNH/X
BXs8zDuCY4317Kv/teHfFwrWEIfcMwfnEvyXBFCht750d0Egt8DdQAbSzT/hk1p5
fCdB3Czpx43je5srrGMF1vTtCs1B57kYUrFP2wgcAHhk9SFDXRjlarUWaCEXcZQR
yVC4CTZYXZiZVZRfMkYW4yljBc2utHh1q3Q0BiMtkHaSyoVgJB/87FdoTvoRxvNk
fD7LPmXsW9kzBWzcr7mHprQD2h5wHsYGXfua+mL2VTZ0HehSbtKEPu2pxEDNTBHX
cAsD9KG3AgMBAAECggEAPuFeKd0x8psMehJ7PhQE6XRZtDmm+WQPAs5tcQAAz8jL
Z5vkK02iPRtWE5b2Fh/ldPA356FbQPwbkURsBvJkgjWZdlgaP5euly9l+gqi07bw
UdLmHu5lN/avkdh/16I04I4FNqiGbiG15utzkcidgAqxicSv4zwAwHHA1Bo5w654
7xPIWsRUz0OIy996RHqlWPDtv4i1cbGDlp6U4ij+MIsyFGdT+4PwldquHYJzM0Y1
9L8TbeaJe2YmVFQxaplhLwkE2fFNx21X9BAOirzQCW7O0BRvqv6M/r/wp+7B0Ef4
TOsPck73FhKuQfBTeVhaJMuxY+/FM8mjLtrcbtONIQKBgQDVEW/6Gp0AUP31R/MZ
XiHsZMfDDBB20oY+5L7giuDS06GWahlJvlr47MNas6RXigx2hqAroW4mws0tBJNz
dzuyzpPtoG1MSv61I3Hf7wKZqAJp2bSq2WfBDZGsCtzT6kBcj13PRqlXZMJ5C0Gy
ZZXgXAL81VdIhYj9iUnbxmAj/QKBgQC6OYYsQ8s5teaqjpT6aoSaCgf6s5YMOYd+
OuxdJL5lWjO428NRCF3KPU+kPcKWBA9nnqf+YtFgkoMvHH+mvO/cmNB2E535fLqd
hfD3CghRJ+YfcZ/xvJZYjkr0t49401dM9MrUCwB/8mEhk9rjOGmvXQ6gr7/g8gDd
dQc5+DeYwwKBgBJXv/YeGGoQjuxw10LV0cHSI0htX3V7Rkdf1fbqvdQol/6k/6xT
kO1hJKhIUtuebNg/WsamzR7VImi/vhnwp9kK471PVFl/E1JwzLrkjqq/xgVq0pzq
vn3mNyZCgSRVRFkzlnXjtWxqpjtZdrxu9mosQa2WiD8cD+ET0qHzAA/ZAoGAD5Db
XDvWct53h24fmcbpio6oGBaGxkLQxoZaV3bIy2P8ysjjzJQscskpLQtUhoGUYA7s
7+CGq9HTUU7KhL9qNUA4vIXrQH1ig+Q8PgoCo/X30E0JF4Wx83kBXu8w+OKBe5dC
lPLOeeNipxHay/9dJiFbJadLHJxd4iT0E65hx00CgYBhWhiVmuQ9WbcL1qr9oA2v
B2FArSbq8qiF47nvfLbTwRkSXBHIfl7PGSNFwv/le393t4nBp+7pdzL/xnOlSgmR
m27KW0msRS59W4SXRaxGWBZCc9QKjN9jjld/+1kvbjQC2rtUeo7gy5MinmTYVKcl
/wpbaS9yJGbkC97Hhl81jA==
-----END PRIVATE KEY-----
19 changes: 19 additions & 0 deletions ssl/RootCA.pem
Original file line number Diff line number Di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iH6sulXkxclw15FltqtHpYAgpgbUWXAbQa6XPxYFtyHCcxr6ko=
-----END CERTIFICATE-----
1 change: 1 addition & 0 deletions ssl/RootCA.srl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0C99FCB4F0AF698A9A8B91D69020857D3CD7B0BC
22 changes: 22 additions & 0 deletions ssl/localhost.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDmjCCAoKgAwIBAgIUDJn8tPCvaYqai5HWkCCFfTzXsLwwDQYJKoZIhvcNAQEL
BQAwIjELMAkGA1UEBhMCVVMxEzARBgNVBAMMCk15LVJvb3QtQ0EwHhcNMjQwOTAx
MDUxMTU3WhcNMjcwNjIyMDUxMTU3WjBtMQswCQYDVQQGEwJVUzESMBAGA1UECAwJ
WW91clN0YXRlMREwDwYDVQQHDAhZb3VyQ2l0eTEdMBsGA1UECgwURXhhbXBsZS1D
ZXJ0aWZpY2F0ZXMxGDAWBgNVBAMMD2xvY2FsaG9zdC5sb2NhbDCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAM/seUXTrv8jQWbNgYUh7DoUCxag9eRcublT
9qpvbF3cmccgiQD0mGz91LqEMtNLSWvtL4Q6wyCBD+iCQL6aY02VzTP74qjIS2XJ
Ps92I/n0F+i1S6YmO0Kt5PEud6V/2cStKX9DNdExE9iQCdpuDwTgCV3L+U0o0pZ9
2Y2IktbPRc/503xAGtBf043kMmZgTM4ZFP3xJ9FzrnTh+9qwHzOJgTYyBGc3Yug+
vaDiYt5lE+rqePe8QLmcqip9azJKCFivum2etHGj+hEkL/tufbHXfGo2lHZGCDcu
hrrvWm3rEU0K5nu/hyZxTN/yZSzuzs5xHu+e5kvCsRJk8ymLgs8CAwEAAaN9MHsw
HwYDVR0jBBgwFoAUMNgKEHXLeHX3TDodxmNSLl6t2D0wCQYDVR0TBAIwADALBgNV
HQ8EBAMCBPAwIQYDVR0RBBowGIIJbG9jYWxob3N0ggtmYWtlMS5sb2NhbDAdBgNV
HQ4EFgQUQ+HiLgAvkkIVLmFzBIskQQnYVIIwDQYJKoZIhvcNAQELBQADggEBACVz
nmUg9DZdRVOynGcKT7noBV/5GqaPd9ku0Tc2ymQqD1hnet1LAKDQjbPKRlRW/c3n
HckjI5o1xdOqosRRS74FjzK/IsMqBbiK7Bk3TUkUHYAuLX8nQOQ99L1JOfXBZBrq
Pkp7C8TXAJW+wPA8HwnLkv3dK+1TBRXA89PF7cTiy/kDsVDIvnnzZOmJB/ip0typ
E3CNim4RiYupgtm7rRZjvzwRMAZ986xfwhbNHFbaS35/9Zpr6DIY5lGUty5aZhPQ
XnY94mM6SpL3/HAZrm3nqrJlb2SVuavVi8e5IQlFXM/aUQP+qwIdROZsjYlv5HaO
44Fb24WYE3O4ZVr1NgI=
-----END CERTIFICATE-----
17 changes: 17 additions & 0 deletions ssl/localhost.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-----BEGIN CERTIFICATE REQUEST-----
MIICsjCCAZoCAQAwbTELMAkGA1UEBhMCVVMxEjAQBgNVBAgMCVlvdXJTdGF0ZTER
MA8GA1UEBwwIWW91ckNpdHkxHTAbBgNVBAoMFEV4YW1wbGUtQ2VydGlmaWNhdGVz
MRgwFgYDVQQDDA9sb2NhbGhvc3QubG9jYWwwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDP7HlF067/I0FmzYGFIew6FAsWoPXkXLm5U/aqb2xd3JnHIIkA
9Jhs/dS6hDLTS0lr7S+EOsMggQ/ogkC+mmNNlc0z++KoyEtlyT7PdiP59BfotUum
JjtCreTxLnelf9nErSl/QzXRMRPYkAnabg8E4Aldy/lNKNKWfdmNiJLWz0XP+dN8
QBrQX9ON5DJmYEzOGRT98SfRc6504fvasB8ziYE2MgRnN2LoPr2g4mLeZRPq6nj3
vEC5nKoqfWsySghYr7ptnrRxo/oRJC/7bn2x13xqNpR2Rgg3Loa671pt6xFNCuZ7
v4cmcUzf8mUs7s7OcR7vnuZLwrESZPMpi4LPAgMBAAGgADANBgkqhkiG9w0BAQsF
AAOCAQEAlqFURzj3DvIseJr8erzaOs2K4gfL/tNjfWgEDcREtcdM9ndR9anSRyyS
hRBAzeegZiwskpgNSnHXxNXj3BeomTJWMmkAE0Gv6gLPxXTIbtGUON8XPeKg9r/C
y8WZkQ5F4CCvjgQ4pXOb1xWHoBmNXGHAksx8aqsTj9cgnckEv2A8qmKzZvMqnmAW
UE2DXWPD3Uc7BBGvb5tuB7EuH7cUp37mXWMEOsy5qO8vQlE3DLY1jL/xgeE5dJZX
am3+BboURQl8saiyJ19u2h+3+f0S3OykZzHMe1jqmDVoIj15CwD2OTPNwVCNoZkb
ZjlxoZ4HYRaPq5oK1GqPopeFvSG9Mw==
-----END CERTIFICATE REQUEST-----
28 changes: 28 additions & 0 deletions ssl/localhost.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDP7HlF067/I0Fm
zYGFIew6FAsWoPXkXLm5U/aqb2xd3JnHIIkA9Jhs/dS6hDLTS0lr7S+EOsMggQ/o
gkC+mmNNlc0z++KoyEtlyT7PdiP59BfotUumJjtCreTxLnelf9nErSl/QzXRMRPY
kAnabg8E4Aldy/lNKNKWfdmNiJLWz0XP+dN8QBrQX9ON5DJmYEzOGRT98SfRc650
4fvasB8ziYE2MgRnN2LoPr2g4mLeZRPq6nj3vEC5nKoqfWsySghYr7ptnrRxo/oR
JC/7bn2x13xqNpR2Rgg3Loa671pt6xFNCuZ7v4cmcUzf8mUs7s7OcR7vnuZLwrES
ZPMpi4LPAgMBAAECggEAGV98nxpJcSYevYpXg2UT3DSE8+J5j0AHhAesgrjtKvkY
JPYh8eVnUmmZU5d9Uk6OK6b6lPLMzAMj61Y1y2ywsI+WxoC29KzYkpe/2/ZJRp/U
aRfynthsg+MPnKT0gdQ7wWX2Oer8PsZz6woMwcS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+pfHO
-----END PRIVATE KEY-----
7 changes: 7 additions & 0 deletions wait-for-it.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
host="$1"
shift
until nc -z "$host" 27017; do
echo "Waiting for MongoDB..."
sleep 3
done
exec "$@"