Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the project path #163

Open
electro575 opened this issue Feb 21, 2023 · 2 comments
Open

Change the project path #163

electro575 opened this issue Feb 21, 2023 · 2 comments

Comments

@electro575
Copy link

Hi all,

I have tried to move all files from the project to another path.


/opt/etesync
to
/var/www/html/etesync

A lot of things are wrote on this URL.
https://github.com/etesync/server/wiki/Production-setup-using-Nginx

I changed all necessary paths.


*nginx configuration

	...
	/static/ {
	-> root /var/www/html/etesync/server/static
	}
	...

*etesync-conf.ini

	[global]
	secret_file = secret.txt
	debug = false
	;Set the paths where data will be stored at
	;static_root = /path/to/static
	;media_root = /var/www/html/etesync/server/media

	;Advanced options, only uncomment if you know what you're doing:
	static_url = /var/www/html/etesync/server/static/
	media_url = /var/www/html/etesync/server/user-media/
	;language_code = en-us
	;time_zone = UTC
	;redis_uri = redis://localhost:6379

*etebase_server.services

	[Unit]
	Description=Execute the etebase server.

	[Service]
	WorkingDirectory=/var/www/html/etesync/server
	ExecStart=/var/www/html/etesync/server/.venv/bin/uvicorn etebase_server.asgi:application --uds /tmp/etebase_server.sock

	[Install]
	WantedBy=multi-user.target

I tried to run instance


uvicorn etebase_server.asgi:application --host 0.0.0.0 --port 8000
or
uvicorn etebase_server.asgi:application --uds /tmp/etebase_server.sock

=> uvicorn try to launch /opt/etesync/server/.venv/bin/python3
rather than new path /var/www/html/etesync/server/.venv/bin/python3


***** A Solution ? *****


Re-run all command applied when setup the project some weeks ago.

No effect !

Maybe have you some steps to configure the project and migrate the database ?

Thanks a lot

@daftaupe
Copy link
Collaborator

I will have to try to reproduce this, but from what I remember I had the issue already and I think that the Python virtual env is linked to a precise path, so you probably have to recreate a new one for the path you're targetting.

Also I don't think there's anything linked to the path in the database.

@tasn
Copy link
Member

tasn commented Jul 23, 2023

I think though that if you chdir to the project's path, you can source the virtualenv no matter where it is. Or am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants