|
| 1 | +import Tabs from '@theme/Tabs'; |
| 2 | +import TabItem from '@theme/TabItem'; |
| 3 | + |
| 4 | +# Run Daikoku |
| 5 | + |
| 6 | +Now you are ready to run Daikoku. You can run the following command with some tweaks depending on the way you want to configure Daikoku. If you want to pass a custom configuration file, use the `-Dconfig.file=/path/to/file.conf` option in the following commands. |
| 7 | + |
| 8 | +:::warning |
| 9 | + |
| 10 | +Daikoku needs a database to run. Before run it, think to start your postgres instance and setup a database with right name (cf. [configuration](../05-firstrun/configfile.md#db-configuration)) |
| 11 | + |
| 12 | +::: |
| 13 | + |
| 14 | +<Tabs> |
| 15 | + <TabItem value="zip" label="From .zip file" default> |
| 16 | + ```sh |
| 17 | + unzip daikoku-x.x.x.zip |
| 18 | + cd daikoku |
| 19 | + ./bin/daikoku |
| 20 | + ``` |
| 21 | + </TabItem> |
| 22 | + <TabItem value="jar" label="From .jar file"> |
| 23 | + For Java 21 |
| 24 | + |
| 25 | + ```sh |
| 26 | + java -jar daikoku.jar |
| 27 | + ``` |
| 28 | + </TabItem> |
| 29 | + <TabItem value="docker" label="From docker"> |
| 30 | + ```sh |
| 31 | + docker run -p "8080:8080" maif/daikoku |
| 32 | + ``` |
| 33 | + |
| 34 | + You can also pass useful args like : |
| 35 | + |
| 36 | + ``` |
| 37 | + docker run -p "8080:8080" daikoku -Dconfig.file=/usr/app/daikoku/conf/daikoku.conf -Dlogger.file=/usr/app/daikoku/conf/daikoku.xml |
| 38 | + ``` |
| 39 | + |
| 40 | + If you want to provide your own config file, you can read [the documentation about config files](../05-firstrun/configfile.md). |
| 41 | + |
| 42 | + You can also provide some ENV variable using the `--env` flag to customize your Daikoku instance. |
| 43 | + |
| 44 | + The list of possible env variables is available [here](../05-firstrun/env.md). |
| 45 | + |
| 46 | + You can use a volume to provide configuration like : |
| 47 | + |
| 48 | + ```sh |
| 49 | + docker run -p "8080:8080" -v "$(pwd):/usr/app/daikoku/conf" maif/daikoku |
| 50 | + ``` |
| 51 | + |
| 52 | + You can also use a volume if you choose to use exports files : |
| 53 | + |
| 54 | + ```sh |
| 55 | + docker run -p "8080:8080" -v "$(pwd):/usr/app/daikoku/imports" maif/daikoku -Ddaikoku.init.data.from=/usr/app/daikoku/imports/export.ndjson |
| 56 | + ``` |
| 57 | + </TabItem> |
| 58 | +</Tabs> |
| 59 | + |
| 60 | +## Run examples |
| 61 | + |
| 62 | +```sh |
| 63 | +$ java \ |
| 64 | + -Xms2G \ |
| 65 | + -Xmx8G \ |
| 66 | + -Dhttp.port=8080 \ |
| 67 | + -Ddaikoku.init.data.from=/home/user/daikoku.ndjson \ |
| 68 | + -Dconfig.file=/home/user/daikoku.conf \ |
| 69 | + -jar ./daikoku.jar |
| 70 | + |
| 71 | +[info] play.api.Play - Application started (Prod) |
| 72 | +[warn] daikokuEnv - Main dataStore seems to be empty, importing from /home/user/daikoku.conf ... |
| 73 | +[warn] daikokuEnv - Importing from: /home/user/daikoku.ndjson |
| 74 | +[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:8080 |
| 75 | +``` |
| 76 | + |
| 77 | +If you choose to start Daikoku without importing existing data, Daikoku will create a new admin user and print the login details in the log. |
| 78 | + |
| 79 | +```sh |
| 80 | +$ java \ |
| 81 | + -Xms2G \ |
| 82 | + -Xmx8G \ |
| 83 | + -Dhttp.port=8080 \ |
| 84 | + -jar daikoku.jar |
| 85 | + |
| 86 | +[info] play.api.Play - Application started (Prod) |
| 87 | +[warn] DaikokuEnv - Main dataStore seems to be empty, generating initial data ... |
| 88 | +[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0.0.0.0:8080 |
| 89 | +[warn] DaikokuEnv - |
| 90 | +[warn] DaikokuEnv - You can log in with admin@daikoku.io / wr4pHmVRArCGhHoteMfwqV6UuvQh6J2z |
| 91 | +[warn] DaikokuEnv - |
| 92 | +[warn] DaikokuEnv - Please avoid using the default tenant for anything else than configuring Daikoku |
| 93 | +[warn] DaikokuEnv - |
| 94 | + |
| 95 | +``` |
0 commit comments