probably working build

This commit is contained in:
Shihaam Abdul Rahman 2022-12-13 23:46:50 +05:00
parent d7f0272d9a
commit a27acf1ad3
Signed by: shihaam
GPG Key ID: 3B007D22E5584980
3 changed files with 13 additions and 23 deletions

View File

@ -16,19 +16,16 @@ RUN apt install git ca-certificates lsb-release apt-transport-https wget curl na
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \ RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
&& locale-gen && locale-gen
# Installing basic tools
RUN apt install nodejs npm -y --no-install-recommends \
&& apt auto-remove -y \
&& apt clean -y
#Get the repos #Get the repos
RUN git clone https://git.shihaam.dev/shihaam/okiba-org-frontend \ RUN git clone https://git.shihaam.dev/shihaam/okiba-org-frontend \
&& git clone https://git.shihaam.dev/shihaam/okiba-org-backend && git clone https://git.shihaam.dev/shihaam/okiba-org-backend \
&& curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash \
RUN cd /root/okiba-org-frontend \ && curl -fsSL https://get.pnpm.io/install.sh | bash \
&& npm install \ && source ~/.profile && source ~/.bashrc \
&& cd /root/okiba-org-backend \ && nvm install node \
&& apt purge npm && cd /root/okiba-org-backend ; pnpm build \
&& wget -O words.txt https://raw.githubusercontent.com/dwyl/english-words/master/words_alpha.txt \
&& cd /root/okiba-org-frontend ; pnpm install ; pnpm run build
# Copy Start Services # Copy Start Services
COPY buildfiles/start_services.sh . COPY buildfiles/start_services.sh .

View File

@ -1,17 +1,10 @@
#!/bin/bash #!/bin/bash
#Default auto configs #Start backend
if ! [ -f init/init ] cd /root/okiba-org-frontend; pnpm start &
then ./auto_config.sh
fi
#Start Php-fpm
cd && node &
#Start frontend #Start frontend
cd && node & cd /root/okiba-org-backend; pnpm run dev &
# Wait for any process to exit # Wait for any process to exit
wait -n wait -n

View File

@ -4,8 +4,8 @@ services:
build: . build: .
hostname: okiba-org hostname: okiba-org
image: git.shihaam.dev/dockerfiles/okiba-org-docker image: git.shihaam.dev/dockerfiles/okiba-org-docker
# volumes: volumes:
# - $PWD/ - $PWD/logs/npm:/root/.npm/_logs/
# ports: # ports:
# - 1111:80 # - 1111:80
restart: always restart: always