add docker-compose recipe
This commit is contained in:
parent
c425371854
commit
b063c6438a
38
Dockerfile
Normal file
38
Dockerfile
Normal file
@ -0,0 +1,38 @@
|
||||
FROM debian:buster-slim
|
||||
|
||||
## install dependencies
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y sudo vim nano locales unzip && \
|
||||
localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 && \
|
||||
apt-get clean
|
||||
|
||||
## set envs
|
||||
ENV LANG fr_FR.utf8
|
||||
ENV TERM xterm
|
||||
|
||||
RUN adduser --uid 1001 --gecos "" --disabled-password appuser
|
||||
RUN usermod -aG sudo appuser
|
||||
RUN echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
#COPY . /home/appuser/citizen
|
||||
COPY vendor/GeoNature-citizen /home/appuser/citizen
|
||||
COPY patches/settings.ini /home/appuser/citizen/config/
|
||||
COPY patches/start.sh /home/appuser/
|
||||
COPY patches/install_app.sh /home/appuser/citizen/install
|
||||
|
||||
RUN chown -R appuser:appuser /home/appuser
|
||||
USER appuser
|
||||
WORKDIR /home/appuser/citizen
|
||||
#RUN install/install_app.sh
|
||||
|
||||
VOLUME /var/lib/postgresql
|
||||
VOLUME /etc/postgresql
|
||||
VOLUME /etc/apache2
|
||||
VOLUME /etc/supervisor
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 5432
|
||||
|
||||
#CMD ["/home/appuser/start.sh"; ";", "/bin/bash"]
|
||||
CMD ["/bin/bash"]
|
4
README
4
README
@ -4,7 +4,9 @@ L'instance Geonature-Citizen de Champs-Libres.
|
||||
|
||||
Installation développeur :
|
||||
|
||||
$ make dev
|
||||
$ docker-compose up -d
|
||||
$ docker exec biommap_geonature_1 install/install_app.sh
|
||||
$ docker attach biommap_geonature_1
|
||||
|
||||
note: les credentials pour accéder au backend se trouvent dans /home/appuser/citizen/config
|
||||
|
||||
|
5
docker-compose.override.yml
Normal file
5
docker-compose.override.yml
Normal file
@ -0,0 +1,5 @@
|
||||
version: '3.3'
|
||||
|
||||
services:
|
||||
citizen:
|
||||
tty: true
|
6
docker-compose.yml
Normal file
6
docker-compose.yml
Normal file
@ -0,0 +1,6 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
citizen:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:80"
|
@ -21,12 +21,12 @@ sudo apt -y install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libns
|
||||
sudo apt -y install apache2 python-dev libpq-dev libgeos-dev supervisor unzip virtualenv libcurl4-openssl-dev libssl-dev
|
||||
sudo apt -y install libglib2.0-0 libsm6 libxext6 libxrender-dev
|
||||
|
||||
RELEASE=$(cat /etc/os-release | grep VERSION_CODENAME |cut -d "=" -f2)
|
||||
#RELEASE=$(cat /etc/os-release | grep VERSION_CODENAME |cut -d "=" -f2)
|
||||
sudo apt install python3 python3-dev python3-pip -y
|
||||
|
||||
sudo apt-get clean
|
||||
|
||||
echo `python3 --version`
|
||||
#echo `python3 --version`
|
||||
|
||||
sudo service supervisor start && sudo supervisorctl stop all
|
||||
#Maj de pip
|
||||
@ -40,12 +40,12 @@ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || pr
|
||||
#cp -r ${HOME}/.nvm /home/synthese/.nvm
|
||||
#chown -R synthese:synthese /home/synthese/.nvm
|
||||
|
||||
set +ex
|
||||
cd ${DIR}/frontend
|
||||
set +x
|
||||
nvm install
|
||||
set -x
|
||||
echo `npm -v`
|
||||
cd ${DIR}
|
||||
set -ex
|
||||
|
||||
#Installation de taxhub
|
||||
#if [ ! -d /home/synthese ]; then
|
||||
@ -60,7 +60,8 @@ python3 -m pip install virtualenv==20.0.1 --user
|
||||
|
||||
sudo a2enmod rewrite proxy proxy_http
|
||||
sudo apache2ctl restart
|
||||
sudo apt-get install postgresql postgresql-client postgresql postgresql-postgis -y
|
||||
sudo apt-get install -y postgresql postgresql-client postgresql-postgis postgresql-server-dev-11
|
||||
sudo apt-get clean
|
||||
|
||||
sudo adduser postgres sudo
|
||||
sudo service postgresql start
|
||||
|
Loading…
Reference in New Issue
Block a user