combine dev and dev-passwd
This commit is contained in:
@@ -48,8 +48,7 @@ Remark42 is a self-hosted, lightweight, and simple (yet functional) comment engi
|
||||
| --site | | `remark` | no | import | site ID |
|
||||
| --file | | `disqus.xml` | no | import | import file |
|
||||
| --dbg | DEBUG | `false` | no | all | debug mode |
|
||||
| --dev | DEV | `false` | no | all | enable `dev` user |
|
||||
| --dev-password | DEV_PASSWD | `password` | no | all | password for `dev` user |
|
||||
| --dev-password | DEV_PASSWD | | no | all | password for `dev` user |
|
||||
|
||||
#### Run modes
|
||||
|
||||
@@ -100,7 +99,7 @@ _instructions for google oauth2 setup borrowed from [oauth2_proxy](https://githu
|
||||
1. Disqus provides an export of all comments on your site in a g-zipped file. This is found in your Moderation panel at Disqus Admin > Setup > Export. The export will be sent into a queue and then emailed to the address associated with your account once it's ready.
|
||||
2. Move this file to your remark42 host and unzip.
|
||||
3. Stop remark42 containers if started, i.e. `docker-compose stop`
|
||||
4. Run import command - `docker-compose run --rm /srv/remark import --file=<disqus-export-xml> --site=<your site id>`
|
||||
4. Run import command - `docker-compose run --rm remark /srv/remark import --file=<disqus-export-xml> --site=<your site id>`
|
||||
5. Start remark42 containers `docker-compose up -d`
|
||||
|
||||
### Frontend
|
||||
|
||||
+4
-5
@@ -28,8 +28,7 @@ var opts struct {
|
||||
RemarkURL string `long:"url" env:"REMARK_URL" default:"https://remark42.com" description:"url to remark"`
|
||||
Admins []string `long:"admin" env:"ADMIN" description:"admin(s) names" env-delim:","`
|
||||
|
||||
DevMode bool `long:"dev" env:"DEV" description:"development mode, no auth enforced"`
|
||||
DevPasswd string `long:"dev-passwd" env:"DEV_PASSWD" default:"password" description:"development mode password"`
|
||||
DevPasswd string `long:"dev-passwd" env:"DEV_PASSWD" default:"" description:"development mode password"`
|
||||
Dbg bool `long:"dbg" env:"DEBUG" description:"debug mode"`
|
||||
|
||||
BackupLocation string `long:"backup" env:"BACKUP_PATH" default:"./var" description:"backups location"`
|
||||
@@ -117,15 +116,15 @@ func main() {
|
||||
SessionStore: sessionStore,
|
||||
Providers: makeAuthProviders(sessionStore, avatarProxy),
|
||||
AvatarProxy: avatarProxy,
|
||||
DevEnabled: opts.DevMode,
|
||||
DevEnabled: opts.DevPasswd != "",
|
||||
DevPasswd: opts.DevPasswd,
|
||||
},
|
||||
Cache: rest.NewLoadingCache(4*time.Hour, 15*time.Minute, postFlushFn),
|
||||
Notifier: notifier.NewNoOperation(),
|
||||
}
|
||||
|
||||
if opts.DevMode {
|
||||
log.Printf("[WARN] running in dev mode, no auth!")
|
||||
if opts.DevPasswd != "" {
|
||||
log.Printf("[WARN] running in dev mode")
|
||||
}
|
||||
|
||||
for _, siteID := range opts.Sites {
|
||||
|
||||
Reference in New Issue
Block a user