Local Docker Deployment

I was able to create the site, most of the errors are related to site-creator starting before mariadb is completed. I moved mariadb service to be first and added dependencies on that on other containers.

I also changed mariadb.cnf ot add barracuda.

I am now getting this error when I browse to the site.
2021-03-13 19:10:57 23 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.11’ (using password: YES)
2021-03-13 19:11:57 24 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.11’ (using password: YES)
2021-03-13 19:12:57 25 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.11’ (using password: YES)
2021-03-13 19:13:57 26 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.11’ (using password: YES)
2021-03-13 19:14:57 27 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.11’ (using password: YES)

The database _5da3170083d9d5b5 is not created in mysql…let me try some more…

Added Health Check to mariadb

and keeping fingers crossed

Now seeing bunch of access denied in the mariadb container:
2021-03-14 0:10:06 86 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.8’ (using password: YES)
2021-03-14 0:10:14 87 [Warning] Access denied for user ‘root’@‘localhost’ (using password: YES)
2021-03-14 0:11:06 88 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.8’ (using password: YES)
2021-03-14 0:11:15 89 [Warning] Access denied for user ‘root’@‘localhost’ (using password: YES)
2021-03-14 0:12:06 90 [Warning] Access denied for user ‘_5da3170083d9d5b5’@‘172.22.0.8’ (using password: YES)
2021-03-14 0:12:15 91 [Warning] Access denied for user ‘root’@‘localhost’ (using password: YES)

UPDATE:
Finally figured out the dependencies, and was able to build the development stack consistently without the errors. The site-creator is taking nearly 2 hours to build the site. Is that normal?

For v13-beta it creates 950+ tables in db.

In play with docker environment, it takes 4-5 minutes to create site and install ERPNext.

I’ve a system where database is hosted on separate server, in that case it takes 15-20 min to create a new site and install ERPNext.

Thanks, @revant_one. I just wanted to double check. Now I will move on to swarm mode. How do you validate that ERPNext is properly installed in PWD environment. I didn’t see any health checks in docker compose.

I am trying with the env-local and still getting a 404. I’ve also tried manually configuring my etc/hosts file but to no avail, I am not able to reach mysite.localhost. One thing I do notice is that my test_site-creator_1 container immediately starts and then exits out.

Any help is much appreciated.

Hey Team…
I m Using a live server and DNS Record. But I Facing the Same problem. my .env file Mention below.

LETSENCRYPT_EMAIL=mail@gmail.com
ERPNEXT_VERSION=edge
FRAPPE_VERSION=edge
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=admin
SITE_NAME=acc.xyz.in
SITES=`acc.xyz.in`
DB_ROOT_USER=root
ADMIN_PASSWORD=admin
INSTALL_APPS=erpnext
ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=websecure
CERT_RESOLVER_LABEL=traefik.http.routers.erpnext-nginx.tls.certresolver=myresolver
HTTPS_REDIRECT_RULE_LABEL=traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)
HTTPS_REDIRECT_ENTRYPOINT_LABEL=traefik.http.routers.http-catchall.entrypoints=web
HTTPS_REDIRECT_MIDDLEWARE_LABEL=traefik.http.routers.http- 
catchall.middlewares=redirect-to-https
HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL=traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
SKIP_NGINX_TEMPLATE_GENERATION=0

And Error Log is
Attempt 1 to connect to mariadb:3306

Attempt 1 to connect to redis-queue:6379


Attempt 1 to connect to redis-cache:6379


Attempt 1 to connect to redis-socketio:6379


Connections OK


Site acc.xyz.in already exists

xyz is just for Example.

It means site-creator container ran 2nd time. First time it must have failed.

enter erpnex-python container and remove the site

docker exec -it <erpnext-python> bash
$ bench drop-site <site-name> --no-backup --archived-sites-path=/home/frappe/backups

or manually delete the files and directory and drop database from mariadb.

Try again after failed site is deleted.

I was Tried But…
mentioned logs of site_crator.

DocTypes for erpnext       : [========================================] 100%


Updating customizations for Address


Updating customizations for Contact


*** Scheduler is disabled ***

End This Error and container stopped. Then I restarted again.

and Again got same error.

This is not error, site got created successfully

site-creator container will run once only. It should fail after that, if it doesn’t it’ll keep re installing site on each restart.

If you’re using portainer then use the docs from docker-swarm setup. https://github.com/frappe/frappe_docker/blob/develop/docs/docker-swarm.md

1 Like

Thanks…Thank A Lot…Successfully Installed.

Hi @aa_prashant I just came across your post, have you managed to get this one sorted?
I think if you are using windows you need to use backslash instead of forward slash /
So for you in your powershell command you have to do.

docker-compose --project-name laxmierp -f installation\docker-compose-common.yml -f installation\docker-compose-erpnext.yml -f installation\docker-compose-networks.yml --project-directory installation up -d

And one more thing, if you are specifying project-directory parameter and using the installation directory, make sure that you have the .env file inside that installation directory, otherwise if your .env file is in the root folder of the frappe_docker then you can omit that parameter and just do.

docker-compose --project-name laxmierp -f installation\docker-compose-common.yml -f installation\docker-compose-erpnext.yml -f installation\docker-compose-networks.yml up -d

Hope that helps.

I’ve had a similar requirement and managed to install it after a bit of help…

Hii friends,

I am trying to deploy frappe ,erp, and custom app using docker on my ubuntu instance , anyone please help me for this or share steps for this.

Thankyou


image

@Ashok_Surwase - above are the steps to deploy Frappe & ERPNext respectively.

these are latest official container based installation steps

1 Like

Installed using these commands on a Digital Ocean droplet.
Works fine, however getting some difficulties in executing few bench commands, it gives some .py files error.
Will look into it again and send the complete trace

@murtaza_bk
Thank you.
I will try this steps.

Hello @revant_one, I am trying to access my site ims.localhost within my LAN. I am running frappe inside docker and unable to access the IP:8000 from other PCs inside the LAN. I am trying this for local LAN deployment.Can you please help me with it?

refer this https://github.com/frappe/frappe_docker/blob/main/docs/port-based-multi-tenancy.md