This repository has been archived by the owner on Dec 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matt Oswalt <[email protected]>
- Loading branch information
Showing
4 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
FROM gitea/gitea:latest | ||
# FROM gitea/gitea:1.4.1 | ||
|
||
# https://discourse.gitea.io/t/i-cannot-programmatically-setup-users-in-a-docker-container/289/5 | ||
|
||
# This directory contains a very basically bootstrapped system. It has no users, no repositories. | ||
# All I did was go through the initial wizard and provide the hostname and tagline. | ||
# Once I captured this, I manually deleted the data-init/ssh directory so Docker wouldn't choke on | ||
# the permissions. Gitea appears to regenerate this on startup if it's missing. | ||
COPY data-init/ /data | ||
|
||
|
||
# COPY data-init/ /data | ||
COPY data-init/gitea/conf/app.ini /data/gitea/conf/app.ini | ||
COPY data-init/gitea/gitea.db /data/gitea/gitea.db | ||
|
||
RUN chown -R git:git /data/gitea | ||
|
||
COPY launch.sh / | ||
ENV USER=root | ||
ENV USER=git | ||
|
||
CMD ["/launch.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
#!/bin/bash | ||
|
||
chown git:git /data/git | ||
chown -R git:git /data/gitea | ||
|
||
# Create first/admin user. Use this to connect via API and perform configuration tasks | ||
gitea admin create-user --username nreadmin --password Password1! --email [email protected] --admin | ||
su -c '/app/gitea/gitea -c /data/gitea/conf/app.ini admin create-user --name nreadmin --password Password1! --email [email protected] --admin' git | ||
|
||
# Start Gitea (original CMD from Gitea's Dockerfile) | ||
/bin/s6-svscan /etc/s6 |