m-chandler / factorio-spot-pricing

Factorio Deployment to AWS
MIT License
98 stars 25 forks source link

/opt/factorio/saves folder does not exist #26

Closed cabraham closed 1 month ago

cabraham commented 2 months ago

@m-chandler I was following the documentation in the readme and found that when I SSH into the server, the /opt/factorio/ folder does not exist.

I'm sure it's an issue with the container setup however I am not familiar with the stack.

codefo-O commented 2 months ago

You won't see an /opt/factorio folder on the ec2 instance itself. The folder is inside the docker container. You should be able to connect to the container and see the folder.

m-chandler commented 2 months ago

I'll have to dig deeper on the weekend. I forget how this works, and I never used it to load an existing save myself.

I could be sending you in the totally wrong direction with these instructions:

I'm thinking you can access EFS (which is mounted inside the container) from within the EC2 instance. If you read this doco https://github.com/m-chandler/factorio-spot-pricing/blob/master/readme.md#remote-access (specifically the code snippet), it suggests grepping the mount points to find exactly where to place the save. I'm pretty sure this will place the save within EFS which in turn is mounted inside the container, thus making the save available.

The "How do I load an existing save?" section talks about auto-saving that takes place when the container spins down. For this reason, it is suggested that you stop the container first (as per the instructions in this section), then upload your save (as per the other instructions I linked above), then start the container.

The image upon which this project is based says that "On subsequent runs the newest save is used.". So you can have multiple saves there, as long as the save you want has the newest date, it will load. You can touch savename.zip to bump the date if necessary.

Let me know how you go, I'll dig further later and update doco as required.

codefo-O commented 2 months ago

So I been playing with it and here is my findings and might help you out. The /opt/factoria folder is only visuable itsoef if you bash into the Docker contrainer running factoria or when you mount the EFS as a directory on the EC2. By default the /opt/factorio folder is not on the ec2.

m-chandler commented 1 month ago

Hi guys, please see updated readme section Uploading an existing save..

I have just tested this myself. Sorry for the confusion.

My earlier instructions about stopping the container via the ECS console can be disregarded, this just results in an auto-save with a newer timestamp and thus your uploaded save will never load.

Closing this issue.