diff --git a/Dockerfile b/Dockerfile index 4a83edd1..c399fc71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,4 @@ RUN curl -s -o go.mod https://raw.githubusercontent.com/animenotifier/notify.moe rm go.* # Create empty working directory -WORKDIR /host \ No newline at end of file +WORKDIR /my \ No newline at end of file diff --git a/README.md b/README.md index 4bf57b0d..cfc11ff5 100644 --- a/README.md +++ b/README.md @@ -6,31 +6,38 @@ ## Prerequisites -* Install [Docker](https://www.docker.com/get-started) and [Compose](https://docs.docker.com/compose/install/) +* Install [Docker](https://www.docker.com/get-started) +* Install [Docker Compose](https://docs.docker.com/compose/install/) -## Clone the repository +## Setup -```bash -git clone https://github.com/animenotifier/notify.moe.git -``` - -## Download the dev image +Download the developer image: ```bash docker pull animenotifier/notify.moe ``` -## Run the dev image +Run the developer image: ```bash docker-compose run notify.moe ``` -## Run the server +## Usage +Your home directory is mounted as `/my` inside Docker. Usually you'd want to clone all repositories you use into a `projects` directory. This directory can be accessed by both your favourite editor on the host machine and also inside Docker. + +* Clone notify.moe repository `git clone https://github.com/animenotifier/notify.moe.git` +* Enter notify.moe repository * Compile TypeScript files using: `tsc` -* Start the web server in notify.moe directory using: `run` -* In your browser, import the file `security/default/root.crt` as a trusted Root authority +* Compile template/style files using: `pack` (optional) +* Start the web server using: `run` + +The `run` binary is a development server that will restart the web server when it detects code changes. + +## In your browser + +* Import the file `security/default/root.crt` as a trusted Root authority * Open `https://beta.notify.moe` ## Author diff --git a/docker-compose.yml b/docker-compose.yml index d7d95cac..e3712464 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ services: context: . network: host image: animenotifier/notify.moe + hostname: docker stdin_open: true tty: true network_mode: host @@ -12,4 +13,4 @@ services: - "80:4000" - "443:4001" volumes: - - ~:/host \ No newline at end of file + - ~:/my \ No newline at end of file