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

As an SFSCON maps maintainer I want to bring the application into production, creating the necessary CI/CD pipeline #9

Open
1 of 3 tasks
clezag opened this issue Sep 23, 2024 · 4 comments
Assignees

Comments

@clezag
Copy link
Member

clezag commented Sep 23, 2024

          @clezag After talking with the SFSCON team, I think we are ready to put the first version intro production on maps.sfscon.it

Originally posted by @sseppi in #2 (comment)

@clezag clezag self-assigned this Sep 23, 2024
clezag added a commit that referenced this issue Sep 23, 2024
@clezag
Copy link
Member Author

clezag commented Sep 23, 2024

@danielegobbetti I've set up production along testing, but in the process I think it nuked the testing DB (testing and prod pointed to the same volume by mistake).
Do you have a dump we can load, or better yet to use to set up the migration pipeline?
When we have figured out the upgrade process, we can move to an actual RDS instance with backups etc.

@danielegobbetti
Copy link
Contributor

@danielegobbetti I've set up production along testing, but in the process I think it nuked the testing DB (testing and prod pointed to the same volume by mistake). Do you have a dump we can load, or better yet to use to set up the migration pipeline? When we have figured out the upgrade process, we can move to an actual RDS instance with backups etc.

On the testing vm there are a couple of dumps ready to be restored. I left the whole history of what I imported there, but consider taking the most recent one.

I'm out of office for the rest of the day, hence I'll not be able to follow up much. The actual import command is adapted from the main repo, but you find it in the history of my user as well.

@clezag
Copy link
Member Author

clezag commented Sep 23, 2024

I've managed to load your dump for test and production, so that's nice.
But it didn't run out of the box, and threw a load of http 500 errors due to some cached images not found.
I think this is because the data directory is not preserved across deployments.

In the end this command fixed it for me, should we call this at launch, too?

docker exec -it -w /app c3nav-prod-c3nav-core-1 /app/env/bin/python manage.py clearmapcache --include-history --include-geometries

Note, that I had to rename the compose deployment, so you will have to swap out c3nav with c3nav-test and c3nav-prod accordingly in your scripts

@danielegobbetti
Copy link
Contributor

danielegobbetti commented Sep 24, 2024

In the end this command fixed it for me, should we call this at launch, too?

docker exec -it -w /app c3nav-prod-c3nav-core-1 /app/env/bin/python manage.py clearmapcache --include-history --include-geometries

Yes, add this to the scripts called at launch, I was testing the right incantation but if you found one that works I'd go for this.

Note, that I had to rename the compose deployment, so you will have to swap out c3nav with c3nav-test and c3nav-prod accordingly in your scripts

Noted, thanks!

clezag added a commit that referenced this issue Sep 24, 2024
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

2 participants