puter icon indicating copy to clipboard operation
puter copied to clipboard

Little mistake in Using Docker Compose

Open zarevskaya opened this issue 1 year ago • 3 comments

Hi ;)

There is a problem maybe, I think.

mkdir puter && cd puter mkdir -p puter/config puter/data sudo chown -R 1000:1000 puter wget https://raw.githubusercontent.com/HeyPuter/puter/main/docker-compose.yml docker compose up

Otherwise we have a puter folder with a puter folder inside.

It's not better to do that?:

mkdir -p puter/config puter/data sudo chown -R 1000:1000 puter cd puter wget https://raw.githubusercontent.com/HeyPuter/puter/main/docker-compose.yml docker compose up

But edit like this in the docker-compose:

volumes: - ./config:/etc/puter - ./data:/var/puter

Have a nice day!

zarevskaya avatar Apr 02 '24 10:04 zarevskaya

This was actually intentional; see this discussion for an explanation.

I'll keep this issue open for a bit though while I think of a better way to reflect this in the documentation. Maybe we shouldn't include the parentmost directory to avoid confusion - @shuguet, what are your thoughts on this?

KernelDeimos avatar Apr 02 '24 22:04 KernelDeimos

Ok, thanks for the answer!

zarevskaya avatar Apr 02 '24 23:04 zarevskaya

Well, that's what I initially suggested, as unless there are plans to have more containers in the future (additional services running in different containers, external database, etc.) it is bound to cause this kind of confusion.

While what's being done right now is idiomatic to docker compose when there's more than one service it might me confusing when there isn't.

I think we can get away with maybe a bit of explanation in the docs? Or simply revert to my initial suggestion of config and data for now, and add a migration step later (stop containers, create service folder, move data & config folder into newly created top level folder, update docker-compose, done).

shuguet avatar Apr 03 '24 06:04 shuguet

README.md is updated

KernelDeimos avatar Apr 04 '24 17:04 KernelDeimos