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

Add environment-to-ini to docker image #14762

Merged
merged 6 commits into from
Feb 23, 2021

Conversation

kdumontnu
Copy link
Contributor

@kdumontnu kdumontnu commented Feb 20, 2021

The question of how to support automated deployment configs has come up a lot lately with many different solutions, so I'd like to add official support for the environment-to-ini util function.

I've added it to the docker build and call it in the docker setup function. Note that I have it outside of the [ ! -f ${GITEA_CUSTOM}/conf/app.ini ] check so that it is run every time the container is started.

If there is support for this I can add a section to https://docs.gitea.io/en-us/install-with-docker/

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 21, 2021
Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the one README change, could you also update the Gitea Docker docs to mention using these changes?

contrib/environment-to-ini/README Show resolved Hide resolved
@codecov-io
Copy link

Codecov Report

Merging #14762 (f956ee9) into master (487f2ee) will decrease coverage by 0.00%.
The diff coverage is 42.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14762      +/-   ##
==========================================
- Coverage   42.21%   42.21%   -0.01%     
==========================================
  Files         767      771       +4     
  Lines       81624    82078     +454     
==========================================
+ Hits        34458    34647     +189     
- Misses      41531    41784     +253     
- Partials     5635     5647      +12     
Impacted Files Coverage Δ
models/action.go 48.52% <0.00%> (-2.42%) ⬇️
models/migrations/migrations.go 2.59% <ø> (ø)
models/migrations/v166.go 0.00% <0.00%> (ø)
models/migrations/v172.go 0.00% <0.00%> (ø)
models/migrations/v173.go 0.00% <0.00%> (ø)
models/session.go 0.00% <0.00%> (ø)
models/user.go 53.05% <ø> (+0.38%) ⬆️
modules/context/context.go 58.05% <0.00%> (-0.45%) ⬇️
modules/indexer/code/elastic_search.go 1.72% <0.00%> (-0.02%) ⬇️
modules/migrations/github.go 77.77% <0.00%> (-1.99%) ⬇️
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6068c1...f956ee9. Read the comment docs.

@zeripath

This comment has been minimized.

Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!!

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 21, 2021
@techknowlogick techknowlogick added type/enhancement An improvement of existing functionality topic/distribution This PR changes something about the packaging of Gitea labels Feb 21, 2021
@techknowlogick techknowlogick added this to the 1.14.0 milestone Feb 21, 2021
Dockerfile.rootless Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 23, 2021
@6543 6543 merged commit 61f347e into go-gitea:master Feb 23, 2021
@decentral1se
Copy link

Thanks for this work but this needs to be made optional. When deploying Gitea using docker swarm, you pass the app.ini as a read-only file. Then when environment-to-ini is always run, the deployment fails because it cannot edit that file. Ideally, there would be an environment var that you could set to avoid running this command. For now, I have to override the entrypoint.

@decentral1se
Copy link

Something conditional to be wrapped around:

environment-to-ini --config ${GITEA_APP_INI}

@6543
Copy link
Member

6543 commented Apr 29, 2021

@decentral1se can you open a new issue and reference this pull, else its likely to get lost in the void

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 29, 2021
@kdumontnu kdumontnu deleted the kd/add_env_to_app_ini branch April 29, 2021 16:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/distribution This PR changes something about the packaging of Gitea type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants