frappe_docker
frappe_docker copied to clipboard
How to install
Hey there, thank you for your effort in this project. I came here in search of a way to get erpnext running for production use in a small company. Sadly it is hard to get any information on how to do this from the docs. I would like to see a docs page with general installation instruction for newbies. Following points could be mentioned there:
- what commands to run to get a basic installation
- what values need to be changed in pwd.yml (i.e. passwords)
- how to configure used ports (if colliding with already installed apps)
- what to configure in a reverse proxy for public access
- how to configure docker volume locations
- what to backup if not using the build in tool
Having the same question.
The Docker Compose needs an .env file that should be generated by python3 easy-install.py --prod --email [email protected]
I guess. But this script is failing with Ubuntu 23.04 (GNU/Linux 5.15.74-1-pve x86_64)
With what system does your script work? Please name OS and Version - Thanks in advance
There is a file called pwd.yml, download it and rename it Docker Compose Yml, run Docker Compose d on your Linux server and open port 8080
Thank you mrchenxxx, that helped. For installation I did following:
curl -O https://raw.githubusercontent.com/frappe/frappe_docker/main/pwd.yml
one might want to change the port in file (I chose 8087):
ports:
- "8087:8080"
docker compose -p erpnext -f pwd.yml up -d
when updating I also do docker compose -p erpnext -f pwd.yml down
before the last command.
wait two minutes before accessing it.
data-volumes got stored in /var/lib/docker/volumes/erpnext_***, so I included these in my backup.
It is possible to store them elsewhere but I did not bother.
For reverse proxying nothing special was needed in apache, just a standard config, in my case:
<VirtualHost *:443>
ServerName erp.example.com
SSLCertificateFile /etc/letsencrypt/live/example.com-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com-0001/privkey.pem
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
Include /etc/letsencrypt/options-ssl-apache.conf
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log vhost_comb
ProxyPreserveHost On
ProxyPass "/" "http://localhost:8087/"
ProxyPassReverse "/" "http://localhost:8087/"
</VirtualHost>
To make the containers work after rebooting: https://stackoverflow.com/a/48066454 so in my case:
# /etc/systemd/system/erpnext-docker-compose.service
[Unit]
Description=ERPnext docker compose
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/data/erpnext/
ExecStart=docker compose -p erpnext -f pwd.yml up -d --force-recreate
ExecStop=docker compose -p erpnext -f pwd.yml down
TimeoutStartSec=50
[Install]
WantedBy=multi-user.target
and: systemctl enable docker-compose-app
Thank you mrchenxxx, that helped. For installation I did following:
curl -O https://raw.githubusercontent.com/frappe/frappe_docker/main/pwd.yml
one might want to change the port in file (I chose 8087):ports: - "8087:8080"
docker compose -p erpnext -f pwd.yml up -d
when updating I also dodocker compose -p erpnext -f pwd.yml down
before the last command. wait two minutes before accessing it. data-volumes got stored in /var/lib/docker/volumes/erpnext_***, so I included these in my backup. It is possible to store them elsewhere but I did not bother. For reverse proxying nothing special was needed in apache, just a standard config, in my case:<VirtualHost *:443> ServerName erp.example.com SSLCertificateFile /etc/letsencrypt/live/example.com-0001/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com-0001/privkey.pem <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" </IfModule> Include /etc/letsencrypt/options-ssl-apache.conf ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log vhost_comb ProxyPreserveHost On ProxyPass "/" "http://localhost:8087/" ProxyPassReverse "/" "http://localhost:8087/" </VirtualHost>
To make the containers work after rebooting: https://stackoverflow.com/a/48066454 so in my case:
# /etc/systemd/system/erpnext-docker-compose.service [Unit] Description=ERPnext docker compose Requires=docker.service After=docker.service [Service] Type=oneshot RemainAfterExit=yes WorkingDirectory=/data/erpnext/ ExecStart=docker compose -p erpnext -f pwd.yml up -d --force-recreate ExecStop=docker compose -p erpnext -f pwd.yml down TimeoutStartSec=50 [Install] WantedBy=multi-user.target
and: systemctl enable docker-compose-app
The stack overflow question you are referring is a couple of years older, you dont need to create a systemd service inorder to restart your setup after reboot, refer --restart flag in docker documentation, docker can restart itself after a reboot
@letajmal the docker compose file already includes a restart_policy. How should I edit that file to make it restart without a systemd service?
@ristein Pwd.yml has a restart policy, which is on-failure. If that doesn't work for you, you can try "always", this will work if you have enabled the docker service
This issue has been automatically marked as stale. You have a week to explain why you believe this is an error.