tullinge / booking

🎫 Bokningssystem för allaktivitetsdag
MIT License
0 stars 1 forks source link

Deploy to CI #24

Closed einarpersson closed 4 years ago

einarpersson commented 4 years ago

Add stage to travis that deploys latest version to CI.

vilhelmprytz commented 4 years ago

Also, deployment should not include the insert_demo_data script. It is only meant for testing. Everything but the initial admin account should (when finished) be creatable from the application itself. The initial admin account can be created with the create_admin script.

vilhelmprytz commented 4 years ago

Suggestion: once the initial system is finished, we can create a Git release (tag) in order to more distinctly separate different versions. If it's possible, we could make it so that the deployment only occurs when a new release is created.

einarpersson commented 4 years ago

Yep, agree!

vilhelmprytz commented 4 years ago

@einarpersson Travis seems to push all updates now, since 9e18a21383063048f6b1cda24ebdb13f8d0b6464. Is it creating any admin users/seeding the database with data?

vilhelmprytz commented 4 years ago

@einarpersson Also, is it possible to set the commit hash as an environment variable (in the docker container) in order to display which commit the system is running on? (for users/admins)

(sorry for sending multiple messages)

einarpersson commented 4 years ago

Status right now: I just manually deployed. I ran the setup_db-script and added a temp admin-account image

I'll try to fix a better flow later today. Showing running version/hash seems reasonable.

vilhelmprytz commented 4 years ago

Is it possible to write the commit hash from Travis?

The version.py could have a variable defined as this.

commit_hash = "development"

And from Travis, before it builds the container, you could use sed to replace the string with the correct hash. Would that be doable?