部署独角数卡-个人自动售货系统

本文最后更新于 208 天前, 如有失效请评论区留言.

部署独角数卡-个人自动售货系统

独角数卡(自动售货系统)-开源站长自动化售货解决方案、高效、稳定、快速

部署比较简单,这里简单记录一下

version: '3'

services:
  dujiaoka:
    image: jiangjuhong/dujiaoka
    container_name: dujiaoka
    restart: always
    volumes:
      - /data/dujiaoka/env:/app/.env 
      #- /data/dujiaoka/install.lock:/app/install.lock
      - /data/dujiaoka/public/uploads:/app/public/uploads
    environment:
      WEB_DOCUMENT_ROOT: "/app/public"
      TZ: Asia/Shanghai
  redis:
    image: docker.io/bitnami/redis:7.2
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - REDIS_PASSWORD=ahPhiiphi3Een5ArahthooYien2gue5o
      - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
    ports:
      - '6379:6379'
    volumes:
      - '/data/redis:/bitnami/redis/data'
    container_name: redis
    restart: always
  mariadb:
    image: docker.io/bitnami/mariadb:11.3
    container_name: mariadb
    restart: always
    ports:
      - '3306:3306'
    volumes:
      - '/data/mariadb:/bitnami/mariadb'
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - MARIADB_ROOT_PASSWORD=ahPhiiphi3Een5ArahthooYien2gue5o
    healthcheck:
      test: ['CMD', '/opt/bitnami/scripts/mariadb/healthcheck.sh']
      interval: 15s
      timeout: 5s
      retries: 6

将上面的文件保存为docker-compose.yaml

先创建相关目录,并赋予777权限

mkdir -p /data/dujiaoka/public/uploads
chmod 777 /data/dujiaoka -R

新建配置文件

touch /data/dujiaoka/env
chmod 777  /data/dujiaoka/env

启动服务

docker compose pull
docker compose up -d

新建数据库

CREATE DATABASE dujia0ka CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'dujia0ka'@'%' IDENTIFIED BY 'ahPhiiphi3Een5ArahthooYien2gue5o';
GRANT ALL PRIVILEGES ON dujia0ka.* TO 'dujia0ka'@'%';
FLUSH PRIVILEGES;

访问服务,由于我使用cft,直接配置, 或者你开启端口映射80

访问按照引导配置好数据库相关的即可。

完成配置后,修改docker-compose.yaml去掉注释掉的install.lock, 还有配置文件env里,需要调整

ADMIN_HTTPS=true

生效服务

touch /data/dujiaoka/install.lock
chmod +x /data/dujiaoka/install.lock
docker compose up -d

到这里安装就完成了哈哈哈,还是很简单的。

Chapters

Sponsor

Like this article? $1 reward

Comments