summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/photoview.yml
blob: 71d92e253bd541ec79b1630178733ff76ab209bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
captainVersion: 4

services:
    $$cap_appname-mariadb:
        image: mariadb:$$cap_mariadb_version
        environment:
            MYSQL_RANDOM_ROOT_PASSWORD: '1'
            MYSQL_DATABASE: $$cap_mariadb_db
            MYSQL_USER: $$cap_mariadb_user
            MYSQL_PASSWORD: $$cap_mariadb_pass
        volumes:
            - $$cap_appname-mariadb-data:/var/lib/mysql
        caproverExtra:
            notExposeAsWebApp: 'true'

    $$cap_appname:
        image: viktorstrate/photoview:$$cap_photoview_version
        depends_on:
            - $$cap_appname-mariadb
        environment:
            PHOTOVIEW_DATABASE_DRIVER: mysql
            PHOTOVIEW_MYSQL_URL: $$cap_mariadb_user:$$cap_mariadb_pass@tcp(srv-captain--$$cap_appname-mariadb)/$$cap_mariadb_db
            PHOTOVIEW_LISTEN_IP: 0.0.0.0
            PHOTOVIEW_LISTEN_PORT: 80
            PHOTOVIEW_MEDIA_CACHE: /app/cache
            MAPBOX_TOKEN: $$cap_mapbox_token
        volumes:
            - $$cap_appname-media-cache:/app/cache
            - $$cap_photos_path:/photos

caproverOneClickApp:
    displayName: Photoview
    isOfficial: true
    description: Photo gallery for self-hosted personal servers.
    documentation: Taken from https://github.com/photoview/photoview/blob/master/docker-compose.example.yml.
    instructions:
        start: >-
            Photoview is a simple and user-friendly photo gallery that's made for photographers and aims to provide an easy and fast way to navigate directories, with thousands of high-resolution photos.


            You configure Photoview to look for photos and videos within a directory on your file system.
            The scanner automatically picks up your media and start to generate thumbnail images to make browsing super fast.


            When your media has been scanned they show up on the website, organised in the same way as on the filesystem.
        end: >-
            Photoview has successfully deployed.

            Finish the setup at http://$$cap_appname.$$cap_root_domain.

    variables:
        - id: $$cap_photoview_version
          label: Photoview Version
          defaultValue: '2.3.9'
          description: Check out their docker page for the valid tags https://hub.docker.com/r/viktorstrate/photoview/tags
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_photos_path
          label: Location of your photos
          description: Change this to the directory where your photos are located on your server.
          validRegex: /\/[^\s-][a-zA-Z0-9_\/-]*[^\/][^\s-]/

        - id: $$cap_mapbox_token
          label: Mapbox Token (Optional)
          description: |-
              To enable map related features, you need to create a mapbox token.

              A token can be generated for free here https://account.mapbox.com/access-tokens/

              It's a good idea to limit the scope of the token to your own domain, to prevent others from using it.

              Leave empty to disable map related features.

        - id: $$cap_mariadb_version
          label: MariaDB Version
          defaultValue: '10.5'
          description: Check out their docker page for the valid tags https://hub.docker.com/r/library/mariadb/tags
          validRegex: /^([^\s^\/])+$/

        - id: $$cap_mariadb_db
          label: MariaDB Database
          description: Name of the Database used by Photoview
          defaultValue: 'photoview'

        - id: $$cap_mariadb_user
          label: MariaDB Username
          description: Username for the Database used by Photoview
          defaultValue: 'photoview'

        - id: $$cap_mariadb_pass
          label: MariaDB Password
          description: Password for the Database used by Photoview
          defaultValue: $$cap_gen_random_hex(16)