docs
docs copied to clipboard
Documentation to access remotely and use on a host with a webserver or Postgresql DB
First of all, thank you for this great software. Initially, I installed it using Symfony and doing so was very easy and I had no issues, however, I've wanted for some time to play with the admin and generator components as well as see what Vulcain is all about, and decided to install it using the recommended Dockers. While I am new to Dockers, getting it up and running on a bare local machine was even easier than the Symfony installation, however, latter struggled on a few issues and would like to see better documentation. The following serves both to indicate where I feel additional documentation is needed and secondarily and selfishly to help me get all working.
- Make available remotely Accessing on a physical machine's web browser using https://localhost was straightforward, however, I typically develop on a remote machine and struggled for hours trying to accomplish this and I am close but still not there. While the documentation describes deployment, I just wanted to show my work to someone remotely and I could never find simple instructions how to accomplish this, and recommend adding something to its-ready. I implemented the following and while I can access it remotely, can no longer access it using https://localhost and post/delete/put/patch requests update the DB but return an mercure
Failed to send an updateerror.
Copy api/.env.test to api/.env.local and replace example.com with your domain name (eg domain.tld). Note that leaving the backslash before the extension did not work for me.
Add .env file in the root directory:
SERVER_NAME=domain.tld
MERCURE_PUBLISHER_JWT_KEY=YourSecretKey
MERCURE_SUBSCRIBER_JWT_KEY=YourSecretKey
- Installed on a host which uses ports 80, 443, or 543 While the troubleshooting documentation slightly addresses this topic, I think more would be helpful and recommend providing a link from installing-the-framework to this new documentation. Not sure if my approach is best, however, providing it just in case.
If you have Postgresql on your host, change docker-compose.override.yml to map port 5432 to 5433 (or unused port you wish) but no need to open this port in your firewall (correct?). Any other changes needed? Is it possible/recommended to use the host's Postgresql server instead of creating one in a docker?
If you have a web server on your host, change docker-compose.yml (and not docker-compose.override.yml as then both ports will be listened to?) to map ports 80 to 8080 and 443 to 8443 (or unused port you wish) and be sure to open them in you firewall(s). No need to change caddy's port from 80, right?
Create a proxy server for your host's webserver (Apache example below) and just a redirect virtual host for port 80 to port 443;
<VirtualHost *:443>
ServerName domain.tld
# Please verify whether this is correct
ProxyPreserveHost On
ProxyPreserveHost On
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerExpire Off
SSLProxyCheckPeerName Off
ProxyPass / https://127.0.0.1:8443/
ProxyPassReverse / https://127.0.0.1:8443/
# Following assumes using https://letsencrypt.org/
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.tld/privkey.pem
#Modify as desired
ErrorLog /var/log/httpd/domain.tld-error.log
CustomLog /var/log/httpd/domain.tld-access.log combined
</VirtualHost>
-
Maybe better documentation to install without using Dockers. No additional required for the api and only needed for the admin, generator components, and Vulcain.
-
Maybe provide a list of items that should be changed. Should everything site specific be in
/.envand/api/.env.local? Why isPOSTGRES_PASSWORDdefined in trackeddocker-compose.yml? Why doesn'thelm/api-platform/values.yamluse previous values for jwt and postgresql?
Thanks again!
I added a post to stackoverflow (https://stackoverflow.com/questions/69106736/how-to-access-api-platform-from-a-remote-web-browser) asking the question parts described in this issue should anyone have answers. Thanks