something something
This commit is contained in:
commit
d7f0272d9a
38
Dockerfile
Normal file
38
Dockerfile
Normal file
@ -0,0 +1,38 @@
|
||||
FROM debian:11-slim
|
||||
|
||||
# set work dir
|
||||
WORKDIR /root/
|
||||
# Set build shell to bash, default has has some issues sometimes
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
RUN apt update && apt upgrade -y
|
||||
|
||||
# Language setup and Initial repo update
|
||||
ENV LANG en_US.UTF-8
|
||||
ENV LANGUAGE en_US:en
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
RUN apt install git ca-certificates lsb-release apt-transport-https wget curl nano vim locales -y \
|
||||
&& apt auto-remove -y \
|
||||
&& apt clean -y
|
||||
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/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
|
||||
RUN git clone https://git.shihaam.dev/shihaam/okiba-org-frontend \
|
||||
&& git clone https://git.shihaam.dev/shihaam/okiba-org-backend
|
||||
|
||||
RUN cd /root/okiba-org-frontend \
|
||||
&& npm install \
|
||||
&& cd /root/okiba-org-backend \
|
||||
&& apt purge npm
|
||||
|
||||
# Copy Start Services
|
||||
COPY buildfiles/start_services.sh .
|
||||
RUN chmod +x start_services.sh
|
||||
|
||||
# Start service
|
||||
CMD ["./start_services.sh"]
|
19
buildfiles/start_services.sh
Normal file
19
buildfiles/start_services.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Default auto configs
|
||||
if ! [ -f init/init ]
|
||||
then ./auto_config.sh
|
||||
fi
|
||||
|
||||
#Start Php-fpm
|
||||
cd && node &
|
||||
|
||||
#Start frontend
|
||||
cd && node &
|
||||
|
||||
|
||||
|
||||
# Wait for any process to exit
|
||||
wait -n
|
||||
# Exit with status of process that exited first
|
||||
exit $?
|
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
services:
|
||||
#########################
|
||||
okiba-org:
|
||||
build: .
|
||||
hostname: okiba-org
|
||||
image: git.shihaam.dev/dockerfiles/okiba-org-docker
|
||||
# volumes:
|
||||
# - $PWD/
|
||||
# ports:
|
||||
# - 1111:80
|
||||
restart: always
|
Loading…
x
Reference in New Issue
Block a user