FROM gitea/gitea:1.14.5-rootless ENV GITEA__database__DB_TYPE=postgres ENV GITEA__database__HOST=${DATABASE_HOST} ENV GITEA__database__NAME=${DATABASE_DB} ENV GITEA__database__USER=${DATABASE_USER} ENV GITEA__database__PASSWD=${DATABASE_PASSWORD} ENV GITEA_CUSTOM=/var/lib/gitea/custom COPY app.ini /var/lib/gitea/custom/conf/app.ini RUN sed -i "s/HTTP_PORT\s*=\s*3000/HTTP_PORT = $PORT/" /var/lib/gitea/custom/conf/app.ini RUN sed -i "s#ROOT_URL\s*=\s*http://localhost/#ROOT_URL = http://localhost:$PORT/#" /var/lib/gitea/custom/conf/app.ini