Skip to content

Commit

Permalink
feat: major refactor (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlijn authored Dec 22, 2024
1 parent 42bedef commit 878b2a5
Show file tree
Hide file tree
Showing 200 changed files with 3,330 additions and 41,410 deletions.
179 changes: 0 additions & 179 deletions .circleci/config.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ yarn-error.log*
/.pnp
.pnp.js
/web-client/build
/web-client/dist

# testing
/coverage
Expand Down
16 changes: 0 additions & 16 deletions Dockerfile

This file was deleted.

27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Example screenshot:

A live demo is available at [https://amony.nl](https://amony.nl). It is running on single [GCE](https://cloud.google.com/compute/) `e2-micro` instance.

**Note:** All videos on the demo site are free and sourced from [Pexels](https://www.pexels.com/license/))
**Note:** All videos on the demo site are free and sourced from [Pexels](https://www.pexels.com/license/)

# How to use

Expand All @@ -19,16 +19,19 @@ A live demo is available at [https://amony.nl](https://amony.nl). It is running

### 1. Pull the image

The image is hosted on a public GC repository.
The image is hosted on a public Google Cloud docker repository.

```bash
docker pull europe-west4-docker.pkg.dev/amony-04c85b/docker-images/amony/app:latest
```

### 2. Run the docker image

The default location for the media files is `/media`. You can mount a local directory to it.
The default location for the solr index, database and config files is `/app/data`. It is recommended to mount a local directory to it to persist the data.

```bash
docker run -v /path/to/my/videos:/usr/local/amony/videos -p 8080:8080 --name amony europe-west4-docker.pkg.dev/amony-04c85b/docker-images/amony/app:latest
docker run -v /path/to/my/media:/media -v /path/to/my/amony-data:/app/data -p 8080:8080 --name amony europe-west4-docker.pkg.dev/amony-04c85b/docker-images/amony/amony-app:latest
```

### 3. Usage
Expand All @@ -46,9 +49,9 @@ The webapp now runs at http://localhost:8080
- [scala 2.13](https://scala-lang.org/) & [sbt](https://www.scala-sbt.org/)
- [fmpeg](https://ffmpeg.org/)

### 1. Prepare your .mp4 files
### 1. Prepare your media files

In dev mode the `.mp4` files are expected to in a directory named `videos` inside the git repository. Move them there or create a symbolic link.
In dev mode the media files are expected to in a directory named `media` inside the git repository. Move them there or create a symbolic link.

### 2. Start the server
```
Expand Down Expand Up @@ -90,23 +93,15 @@ npm install --save
npm run build
```

### 2. Build the server
### 2. Build the docker image

```
cd server
sbt assembly
```

### 3. Build the docker image

```
docker build -t my-amony-app:latest .
sbt web-server/jibDockerBuild
```

The first time this can take a bit longer since it downloads & installs all dependencies for `ffmpeg`.

### 4. Run the docker image

```bash
docker run -v /path/to/my/videos:/usr/local/amony/videos -p 8080:8080 my-amony-app:latest
docker run -v /path/to/my/media:/media -v /path/to/my/amony-data:/app/data -p 8080:8080 --name amony europe-west4-docker.pkg.dev/amony-04c85b/docker-images/amony/amony-app:latest
```
4 changes: 2 additions & 2 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:11-jdk-slim
FROM openjdk:21-jdk-slim

RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends ffmpeg;
apt-get install -y --no-install-recommends ffmpeg imagemagick;
7 changes: 4 additions & 3 deletions server/.scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version = 3.8.3
runner.dialect = scala3

align.preset = more
align.tokens.add = [
{code = "=", owner = "Term.Assign|Defn.Val" }
]
maxColumn = 120

rewrite.rules = [ExpandImportSelectors]
maxColumn = 120
3 changes: 3 additions & 0 deletions server/.sdkmanrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=21.0.3-tem
Loading

0 comments on commit 878b2a5

Please sign in to comment.