Skip to content

Commit 1db59e0

Browse files
authored
Add docker compose example configuration (#267)
1 parent dc7d699 commit 1db59e0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docker-compose.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
services:
3+
gokapi:
4+
image: f0rc3/gokapi:latest
5+
container_name: gokapi
6+
ports:
7+
- "53842:53842"
8+
environment:
9+
- TZ=UTC
10+
volumes:
11+
- ./gokapi-data:/app/data
12+
- ./gokapi-config:/app/config
13+
restart: always
14+
15+
volumes:
16+
gokapi-data:
17+
gokapi-config:

docs/setup.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ If you do not want the binary to run as the root user in the container, you can
7676

7777
Please make sure that ``/app/data`` and ``/app/config`` are mounted as volumes (see example above), otherwise you will lose all your data after rebuilding or updating your container.
7878

79+
Docker Compose
80+
""""""""""""""""
81+
82+
To launch Gokapi using Docker Compose, download the ``docker-compose.yaml`` file from the repository. You can adjust the environment variables under the ``environment:`` section according to the explanation above.
83+
84+
The folders ``gokapi-data`` and ``gokapi-config`` will be created automatically in the current directory, if they do not exist yet. You can change the names of these folders to your liking, but make sure to adjust the paths in the ``volumes:`` section accordingly.
85+
86+
By default, the container is set to always automatically (re)start when the system boots up. If you don't want this, you can remove the ``restart: always`` line or change it to ``restart: unless-stopped`` to have it only restart after a crash.
87+
88+
Then, start the container with the command ``docker compose up -d``
7989

8090
Native Deployment
8191
""""""""""""""""""

0 commit comments

Comments
 (0)