Content
You are here:
Initial configuration after docker install for Apache2 on Raspbian
Added by Federico P over 4 years ago
I have installed Openproject with Docker on a Raspberrypi 3 (running rapsbian stretch) that I use as a remote webserver (with Apache2). So far I have been able to follow the official guide, up to the configuration of the virtual webserver but when I try to access openproject from another computer (by visiting http;//openproject.mydomain.com
I get the error 503 Service unavailable:The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
I will try to include everything I did in the code snippet below, with the doubts I had along the way as comments.
##### 1) I wanted to install Openproject (OP) in /opt/openproject
cd /opt
git clone --depth=1 --branch=stable/10 https://github.com/opf/openproject
docker-compose up -d
##### 2) create a directory on host system to store data across container restarts
sudo mkdir -p /var/lib/openproject/{pgdata,static}
docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret \
-v /var/lib/openproject/pgdata:/var/openproject/pgdata \
-v /var/lib/openproject/static:/var/openproject/assets \
openproject/community:10
## Do /var/lib/openproject/pgdata and /var/lib/openproject/static be mapped to the location where I installed openproject (i.e. /opt/openproject) or do they refer to locations within the container?
docker stop openproject
docker start openproject
##### 3) I did not pass any environment variable because there seemed to be nothing that needed changing. However, I wonder how does Openproject connect to the database, for instace? Is it all done aoutomatically when running `docker compose -d`?
##### 4) If I run `docker ps` to list containers, I get 7 containers
openproject_proxy_1
openproject_seeder_1
openproject_web_1
openproject_worker_1
openproject_cron_1
openproject_cache_1
openproject_db_1
##### 5) Set `/etc/apache2/sites-available/openproject.conf` as follows:
<VirtualHost *:80>
ServerName openproject.mydomain.com
ServerAlias www.openproject.mydomain.com
DocumentRoot /opt/openproject/public
ErrorLog ${APACHE_LOG_DIR}/error-openproject.log
CustomLog ${APACHE_LOG_DIR}/access-openproject.log combined
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [R,L]
<Directory /home/openproject/openproject/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory>
# Request browser to cache assets
<Location /assets/>
ExpiresActive On ExpiresDefault "access plus 1 year"
</Location>
</VirtualHost>
##### 6) Set `/etc/apache2/sites-available/openproject-ssl.conf` as follows:
<VirtualHost *:443>
ServerName openproject.federicopiovesan.com
ServerAlias www.openproject.federicopiovesan.com
SSLEngine on
SSLCertificateFile /etc/ssl/certs/mydomain.pem
SSLCertificateKeyFile /etc/ssl/private/mydomain.key
RewriteEngine on
RewriteRule "^$" "/" [R,L]
ProxyRequests off
ErrorLog ${APACHE_LOG_DIR}/error_openproject.log
CustomLog ${APACHE_LOG_DIR}/access_openproject.log combined
<Location "/">
RequestHeader set X-Forwarded-Proto 'https'
ProxyPreserveHost On
ProxyPass http://127.0.0.1:8080/
ProxyPassReverse http://127.0.0.1:8080/
</Location>
</VirtualHost>
##### 7) Enable both websites and restart apache
sudo a2ensite openproject
sudo a2ensite openproject-ssl
sudo systemctl restart apache2
Replies (1)
Well after days of trying I found out that Openproject cannot be installed on a rapberry pi because it is based on an arm architecture. I found a guide that explains how to install it on a Pi 4 (although it looks like a lenghty and complicated process) but I have a Pi3 and it seems that it does not have enough resources to run OP.
Perhaps a line could be added in the installation guide about installing OP on ARM devices like the Pi.