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

Remove explicit /srv/ usage from docker-compose files #1262

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

paskal
Copy link
Sponsor Collaborator

@paskal paskal commented Feb 6, 2022

We have plenty of paths used in the application (like AVATAR_FS_PATH, IMAGE_FS_PATH), but two of them are hardcoded in examples all over the code for historical reasons.

I found that by default in Docker, the path would anyway resolve to the value we are setting it explicitly to, so it doesn't make sense to set a few variables we are setting now explicitly.

I was confused by these two variables when figuring out how to run the application outside of docker by looking at the default variables we propose in docker-compose.yml.

We have plenty of paths used in the application, but two of them
are hardcoded in examples all over the code for historical reasons.

I found that by default in Docker, the path would resolve to the value
we are setting it explicitly to, so it doesn't make sense to set
a few variables we are setting now explicitly.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1803644200

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 84.563%

Totals Coverage Status
Change from base Build 1803346585: 0.03%
Covered Lines: 6075
Relevant Lines: 7184

💛 - Coveralls

@umputun
Copy link
Owner

umputun commented Feb 6, 2022

just to make sure: the reason to remove it is /srvWORKDIR in docker plus default values in cmd/server.go producing the same path anyway, correct?

@paskal
Copy link
Sponsor Collaborator Author

paskal commented Feb 6, 2022

Correct, the binary starts from /srv and works with default values starting with ./var/, resulting in /srv/var/ usage.

@umputun umputun merged commit 9dbc36e into master Feb 7, 2022
@umputun umputun deleted the paskal/no_path branch February 7, 2022 09:54
@paskal paskal added this to the v1.9 milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants