Preparing docker deployment
gitea/hedera-web/master There was a failure building this commit
Details
gitea/hedera-web/master There was a failure building this commit
Details
This commit is contained in:
parent
d01fb711b1
commit
21a4aee8e4
|
@ -0,0 +1,2 @@
|
||||||
|
debian
|
||||||
|
node_modules
|
|
@ -0,0 +1,32 @@
|
||||||
|
FROM debian:buster-slim
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
gnupg2 \
|
||||||
|
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
||||||
|
&& echo "deb http://apt.verdnatura.es/ jessie main" \
|
||||||
|
> /etc/apt/sources.list.d/vn.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
apache2 \
|
||||||
|
libapache2-mod-php \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& . /etc/apache2/envvars \
|
||||||
|
&& ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log" \
|
||||||
|
&& ln -sfT /dev/stdout "$APACHE_LOG_DIR/access.log" \
|
||||||
|
&& ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"
|
||||||
|
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
||||||
|
&& apt-get install -y --no-install-recommends nodejs \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y hedera-web \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN a2dissite 000-default
|
||||||
|
|
||||||
|
CMD ["apachectl", "-D", "FOREGROUND"]
|
22
apache.conf
22
apache.conf
|
@ -1,10 +1,14 @@
|
||||||
# Alias /hedera-web /usr/share/hedera-web/
|
Alias /image-db /mnt/storage/image/
|
||||||
# Alias /image-db /var/lib/hedera-web/image-db/
|
Alias /vn-access /mnt/storage/vn-access/
|
||||||
|
|
||||||
<IfModule mod_mime.c>
|
<IfModule mod_mime.c>
|
||||||
AddType text/x-yaml .yml
|
AddType text/x-yaml .yml
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
<VirtualHost *:80>
|
||||||
|
DocumentRoot /usr/share/hedera-web/
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
<Directory /usr/share/hedera-web/>
|
<Directory /usr/share/hedera-web/>
|
||||||
Options -Indexes -FollowSymLinks
|
Options -Indexes -FollowSymLinks
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
@ -21,20 +25,28 @@
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /var/lib/hedera-web/image-db/>
|
<Directory /mnt/storage/image/>
|
||||||
Options +Indexes +FollowSymLinks
|
Options +Indexes +FollowSymLinks
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /var/lib/hedera-web/image-db/*/*>
|
<Directory /mnt/storage/image/*/*>
|
||||||
Options -Indexes -MultiViews +FollowSymLinks
|
Options -Indexes -MultiViews +FollowSymLinks
|
||||||
AllowOverride FileInfo Options
|
AllowOverride FileInfo Options
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|
||||||
<IfModule mod_headers.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /
|
RewriteBase /
|
||||||
RewriteCond %{REQUEST_FILENAME} !\.[a-zA-Z0-9]+$
|
RewriteCond %{REQUEST_FILENAME} !\.[a-zA-Z0-9]+$
|
||||||
RewriteRule ^(.+)$ %{REQUEST_URI}.png [L]
|
RewriteRule ^(.+)$ %{REQUEST_URI}.png [L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<Directory /mnt/storage/vn-access>
|
||||||
|
Require all granted
|
||||||
|
AllowOverride None
|
||||||
|
Options +Indexes
|
||||||
|
IndexIgnoreReset On
|
||||||
|
Header set X-Robots-Tag "noindex, nofollow"
|
||||||
|
</Directory>
|
||||||
|
|
|
@ -10,6 +10,6 @@ then
|
||||||
apache2_invoke enconf hedera-web.conf
|
apache2_invoke enconf hedera-web.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
service php7.3-fpm restart
|
#service php7.3-fpm restart
|
||||||
service cron restart
|
#service cron restart
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
back:
|
||||||
|
image: registry.verdnatura.es/hedera-web
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- ${PORT:?}:80
|
||||||
|
configs:
|
||||||
|
- source: config
|
||||||
|
target: /etc/hedera-web/config.my.php
|
||||||
|
- source: test
|
||||||
|
target: /etc/hedera-web/config.test.php
|
||||||
|
- source: apache
|
||||||
|
target: /etc/apache/conf-enabled/vn-share.conf
|
||||||
|
volumes:
|
||||||
|
- /mnt/storage/image:/mnt/storage/image
|
||||||
|
- /mnt/storage/vn-access:/mnt/storage/vn-access
|
||||||
|
- /mnt/storage/share:/mnt/storage/share
|
||||||
|
deploy:
|
||||||
|
replicas: 2
|
||||||
|
configs:
|
||||||
|
config:
|
||||||
|
external: true
|
||||||
|
name: ${PROJECT_NAME:?}_config
|
||||||
|
test:
|
||||||
|
external: true
|
||||||
|
name: ${PROJECT_NAME:?}_test
|
||||||
|
apache:
|
||||||
|
external: true
|
||||||
|
name: ${PROJECT_NAME:?}_apache
|
Loading…
Reference in New Issue