{"id":770,"date":"2025-05-12T22:24:25","date_gmt":"2025-05-12T14:24:25","guid":{"rendered":"https:\/\/www.zhzxs.xyz\/?p=770"},"modified":"2025-05-12T22:24:27","modified_gmt":"2025-05-12T14:24:27","slug":"1747059852","status":"publish","type":"post","link":"https:\/\/www.zhzxs.site\/index.php\/2025\/05\/12\/1747059852\/","title":{"rendered":"\u4f7f\u7528 Docker Compose \u90e8\u7f72 Firefly III"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddf1 \u4e00\u3001\u51c6\u5907\u5de5\u4f5c<\/h2>\n\n\n\n<p>\u786e\u4fdd\u4f60\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u4ee5\u4e0b\u7ec4\u4ef6\uff08\u4f60\u4e4b\u524d\u5e94\u8be5\u5df2\u7ecf\u88c5\u597d\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker -v\ndocker compose version\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udcc1 \u4e8c\u3001\u521b\u5efa\u9879\u76ee\u76ee\u5f55\u5e76\u51c6\u5907\u914d\u7f6e<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/firefly\ncd ~\/firefly\n<\/code><\/pre>\n\n\n\n<p>\u65b0\u5efa <code>docker-compose.yml<\/code> \u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: '3.5'\n\nservices:\n  fireflyiii:\n    image: fireflyiii\/core:latest\n    container_name: fireflyiii\n    restart: unless-stopped\n    ports:\n      - 8080:8080\n    environment:\n      APP_KEY: base64:YOUR_RANDOM_KEY_HERE\n      DB_HOST: db\n      DB_PORT: 3306\n      DB_CONNECTION: mysql\n      DB_DATABASE: firefly\n      DB_USERNAME: firefly\n      DB_PASSWORD: fireflypassword\n      TRUSTED_PROXIES: '**'\n      APP_URL: http:\/\/your-server-ip:8080\n    depends_on:\n      - db\n\n  db:\n    image: mariadb:10.6\n    container_name: firefly_db\n    restart: unless-stopped\n    environment:\n      MYSQL_DATABASE: firefly\n      MYSQL_USER: firefly\n      MYSQL_PASSWORD: fireflypassword\n      MYSQL_ROOT_PASSWORD: rootpassword\n    volumes:\n      - .\/mysql:\/var\/lib\/mysql\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udd10 \u4e09\u3001\u751f\u6210\u968f\u673a APP_KEY<\/h2>\n\n\n\n<p>\u4f60\u53ef\u4ee5\u5728\u7ec8\u7aef\u751f\u6210 APP_KEY\uff0c\u7528\u4e8e\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl rand -base64 32\n<\/code><\/pre>\n\n\n\n<p>\u7ed3\u679c\u5f62\u5982 <code>Y2F0cy1hcmUtd2lsZC0xMjM0NTY=<\/code><\/p>\n\n\n\n<p>\u52a0\u4e0a\u524d\u7f00 <code>base64:<\/code>\uff0c\u586b\u5165\u4e0a\u9762\u7684 <code>APP_KEY<\/code> \u4f4d\u7f6e\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\ude80 \u56db\u3001\u542f\u52a8\u5bb9\u5668<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d\n<\/code><\/pre>\n\n\n\n<p>\u9996\u6b21\u542f\u52a8\u4f1a\u81ea\u52a8\u5b89\u88c5\u4f9d\u8d56\u5e76\u521d\u59cb\u5316\u6570\u636e\u5e93\uff0c\u8bbf\u95ee\u5730\u5740\u662f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;\u4f60\u7684\u670d\u52a1\u5668IP:8080\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83d\udee0\ufe0f \u4e94\u3001\u521d\u59cb\u5316 Firefly III<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u6253\u5f00\u7f51\u9875\u540e\uff0c\u4f1a\u63d0\u793a\u4f60\u521b\u5efa\u7b2c\u4e00\u4e2a\u7528\u6237\uff08\u7ba1\u7406\u5458\uff09<\/li>\n\n\n\n<li>\u8bbe\u7f6e\u5bc6\u7801\u540e\u5373\u53ef\u767b\u5f55 Firefly III Web \u7ba1\u7406\u754c\u9762<\/li>\n\n\n\n<li>\u53ef\u8fdb\u5165\u8bbe\u7f6e\u9875\u9762\u521b\u5efa API Token\uff0c\u7ed9\u5b89\u5353 App \u7528<\/li>\n\n\n\n<li>\u540e\u7eed\u53ef\u914d\u7f6e\u4e2d\u6587\u3001\u5206\u7c7b\u3001\u8d44\u4ea7\u3001\u9884\u7b97\u3001\u62a5\u8868\u7b49<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\ud83e\uddfd \u516d\u3001\u4e2d\u6587\u8bbe\u7f6e\uff08\u53ef\u9009\uff09<\/h2>\n\n\n\n<p>\u8fdb\u5165 Web \u540e\u53f0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bbe\u7f6e\uff08Settings\uff09\u2192 \u7528\u6237\uff08User\uff09\u2192 \u8bed\u8a00\uff08Language\uff09\u9009\u62e9\u4e2d\u6587\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u4e03\u3001\u5e38\u7528\u64cd\u4f5c<\/h2>\n\n\n\n<p>\u67e5\u770b\u65e5\u5fd7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose logs -f fireflyiii\n<\/code><\/pre>\n\n\n\n<p>\u91cd\u542f\u670d\u52a1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose restart\n<\/code><\/pre>\n\n\n\n<p>\u505c\u6b62\u670d\u52a1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose down\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u2705 \u516b\u3001\u4e0b\u4e00\u6b65\u5efa\u8bae<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u2714 \u8bbe\u7f6e nginx + HTTPS \u57df\u540d\u8bbf\u95ee\uff08\u5efa\u8bae\uff09<\/li>\n\n\n\n<li>\u2714 \u5b89\u88c5\u5b89\u5353 App\uff08<a href=\"https:\/\/github.com\/firefly-iii\/firefly-iii-mobile\">Firefly III Mobile<\/a>\uff09<\/li>\n\n\n\n<li>\u2714 \u8bbe\u7f6e\u8d26\u672c\u3001\u8d26\u6237\u3001\u81ea\u52a8\u5316\u811a\u672c\u5bfc\u5165\u5fae\u4fe1\u8d26\u5355\u7b49<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\ud83e\uddf1 \u4e00\u3001\u51c6\u5907\u5de5\u4f5c \u786e\u4fdd\u4f60\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u4ee5\u4e0b\u7ec4\u4ef6\uff08\u4f60\u4e4b\u524d\u5e94\u8be5\u5df2\u7ecf\u88c5\u597d\uff09\uff1a \ud83d\udcc1 \u4e8c\u3001\u521b\u5efa\u9879\u76ee\u76ee\u5f55\u5e76\u51c6\u5907\u914d\u7f6e \u65b0\u5efa d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":93,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[151,152],"class_list":["post-770","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-2","tag-firefly-iii","tag-152"],"_links":{"self":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/comments?post=770"}],"version-history":[{"count":1,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/770\/revisions"}],"predecessor-version":[{"id":771,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/posts\/770\/revisions\/771"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/media?parent=770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/categories?post=770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhzxs.site\/index.php\/wp-json\/wp\/v2\/tags?post=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}