Docker config is now in its own repository
This commit is contained in:
parent
ada588c739
commit
a1c3ca029d
@ -3,6 +3,7 @@ services:
|
||||
notify.moe:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/development.Dockerfile
|
||||
network: host
|
||||
image: animenotifier/notify.moe
|
||||
hostname: docker
|
||||
@ -10,7 +11,6 @@ services:
|
||||
tty: true
|
||||
network_mode: host
|
||||
ports:
|
||||
- "80:4000"
|
||||
- "443:4001"
|
||||
volumes:
|
||||
- ~:/my
|
60
docker/README.md
Normal file
60
docker/README.md
Normal file
@ -0,0 +1,60 @@
|
||||
# animenotifier/notify.moe
|
||||
|
||||
This is a fully pre-configured development environment for Anime Notifier development (notify.moe).
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisities
|
||||
|
||||
In order to run this container you'll need docker installed.
|
||||
|
||||
* [Linux](https://docs.docker.com/linux/started/)
|
||||
* [Mac](https://docs.docker.com/mac/started/)
|
||||
* [Windows](https://docs.docker.com/windows/started)
|
||||
|
||||
### Usage
|
||||
|
||||
#### Download the image
|
||||
|
||||
```shell
|
||||
docker pull animenotifier/notify.moe
|
||||
```
|
||||
|
||||
#### Boot up the dev environment
|
||||
|
||||
Download the notify.moe repository to get access to the docker-compose configuration. Run the following inside the repository:
|
||||
|
||||
```shell
|
||||
docker-compose run notify.moe
|
||||
```
|
||||
|
||||
#### Volumes
|
||||
|
||||
* `/my` - Your home directory
|
||||
|
||||
## Built With
|
||||
|
||||
* Arch Linux
|
||||
* Aero
|
||||
* Git
|
||||
* ...any many others.
|
||||
|
||||
## Find Us
|
||||
|
||||
* [Discord](https://github.com/animenotifier/notify.moe)
|
||||
* [GitHub](https://github.com/animenotifier/notify.moe)
|
||||
|
||||
## Contributing
|
||||
|
||||
Please read [CONTRIBUTING.md](https://github.com/animenotifier/notify.moe/blob/go/CONTRIBUTING.md) for details on how to contribute to this project.
|
||||
|
||||
## Authors
|
||||
|
||||
* **Eduard Urbach** - [eduardurbach.com](https://eduardurbach.com)
|
||||
|
||||
See also the list of [contributors](https://github.com/animenotifier/notify.moe/graphs/contributors) who
|
||||
participated in this project.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/animenotifier/notify.moe/blob/go/LICENSE) file for details.
|
3
main.go
3
main.go
@ -55,9 +55,6 @@ func configure(app *aero.Application) *aero.Application {
|
||||
app.Config.Domain = "beta.notify.moe"
|
||||
app.Config.Title += " - Beta"
|
||||
app.Config.Manifest.Name = app.Config.Title
|
||||
|
||||
// Test connectivity
|
||||
app.OnStart(testConnectivity)
|
||||
}
|
||||
|
||||
// Authentication
|
||||
|
33
ports.go
33
ports.go
@ -1,33 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/blitzprog/color"
|
||||
)
|
||||
|
||||
// testConnectivity will test if port 443 is accessible or not.
|
||||
// If not, it will attempt to run "sudo make ports" and resume
|
||||
// execution once the user has entered the password.
|
||||
func testConnectivity() {
|
||||
config := tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
}
|
||||
|
||||
_, err := tls.Dial("tcp", ":443", &config)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println("--------------------------------------------------------------------------------")
|
||||
color.Red("HTTPS port 443 is not accessible")
|
||||
fmt.Println("Running", color.YellowString("make ports"), "to be able to access", color.GreenString("https://"+app.Config.Domain))
|
||||
|
||||
cmd := exec.Command("sudo", "make", "ports")
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Run()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user