From 3872ddbb68d4913ae180df24435dcd529895879c Mon Sep 17 00:00:00 2001 From: Artyom Ashirov <1323ED5@gmail.com> Date: Thu, 14 Nov 2024 16:44:00 +0300 Subject: [PATCH] docker --- Dockerfile | 11 +++++++++++ db/shop.db | Bin 0 -> 61440 bytes docker-compose.yml | 17 +++++++++++++++++ shop.db | 0 src/config/config.js | 8 ++++---- src/config/database.js | 4 ++-- 6 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 Dockerfile create mode 100644 db/shop.db create mode 100644 docker-compose.yml delete mode 100644 shop.db diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..22e420b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:22 + +WORKDIR /app + +COPY package*.json /app/ +COPY src/ /app/src/ +COPY db/shop.db /app/shop.db + +RUN npm install + +CMD ["node", "src/index.js"] \ No newline at end of file diff --git a/db/shop.db b/db/shop.db new file mode 100644 index 0000000000000000000000000000000000000000..672dbc4aa653342d67f1ac8310457474ed1afe67 GIT binary patch literal 61440 zcmeI)PjAy^9KdnAvy}B$A04H^ZPx2EF<i#pR{j3&-dF(%voHomJ7tmY+B)bz^;9f3pR#y)McIBp6Kki+r?P}`^XbL^9OnSy)q~CwkZi(&AnFh zo>^44-`Re=Z%$XVDU!QxOj_FbYPDwUtm~RTaJ`q&^S(?a%O1r+x^F3%)|Rrnc5-mB zZd|*jzy3K5P;pbm)+Hr0#qqi0(hp=MelYmFahbXcB`(?V=s$)fJ72cuR9J3Zsu>Ti zm4&5%w6==vm6P=gb>r$){q>bJAX)8EzOk%?BR@QMG@M{Gh{NO3F5t(dWv(B^q3^_{ z*Ur~{vV0%k*rssgEo_SH%kr$>TCN%9)iT~3#@fm^FTTEgKE?gz%M^Dw3Y|kc@}hj> zf`XeLo*Q=*dEwblTc>kXExZ0 z*7s)Xq1ebzxGQcpim@jSV!Lk*Wt2TRcs1MkAemh^eS&&vrf0cw44r@coDeE~G&wf2 ze=4JJ!K_p?Ib2d#Hom@X*XzcWEBdd`#%VJSS(IITUQL=w>D)P!rR&)#F&Q#uOm4+s zKjXx+WsEd4BhU`27@Jj)X`n{RJs z8TbCFckd`UJ3I{Hz#4`9Q@3>JyRJ8|W)wR?5W4N&}k}Lb8fp-)Pe5b6! z&k(PoHIs$VB;K21Dmn92&^JppW4BSZ3Q|KS7n(|#Ymd&=j2k!fgES!~4-S#{d?bCm zQ@e{wN}MX(NT!cXd1d27*XxF1=&!~}mQK{^uLb4$^w8Xy6nlN|X=ooMGi3VYHir5@ zK1?re3)f^pd1`FWR+py^e^mIhj@DSH8F!4bkfcqww$eZ6zs1(uVB@%&%a@X{^>5I_I{1Q0*~0R#|0009J20p9{00IagfB*srAb%xriBO~fB*srAb0sjBL z>c^NCB7gt_2q1s}0tg_000Iag!25r4009ILKmY**5I_I{1Q0*~f$9tJ{=fP$riBO~ zfB*srAb { @@ -243,8 +243,8 @@ const initDb = async () => { // Initialize the database (async () => { - await cleanUpInvalidForeignKeys(); await initDb(); + await cleanUpInvalidForeignKeys(); })().catch(error => { console.error('Database initialization failed:', error); process.exit(1);