/openjob-docker

Openjob docker

Primary LanguageShellApache License 2.0Apache-2.0

Openjob

Docker

build

cd build && docker build --tag=openjob:1.0.7 .

.env

OJ_DS_URL=jdbc:mysql://127.0.0.1:3306/openjob?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
OJ_LOG_STORAGE_MYSQL_URL=jdbc:mysql://127.0.0.1:3306/openjob?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai

start

docker run --env-file .env -it -d -p 8080:8080 626f74431178 /bin/bash

docker-compose

docker-compose.yml

version: '3'
services:
  openjob-server:
    image: openjob/openjob-server:latest
    restart: always
    container_name: openjob-server
    environment:
      - OJ_DS_URL=jdbc:mysql://127.0.0.1:3306/openjob?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
      - OJ_LOG_STORAGE_MYSQL_URL=jdbc:mysql://127.0.0.1:3306/openjob?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
    ports:
      - "8080:8080"

start

docker-compose up
# or
docker-compose up -d

docker hub

docker login

docker tag openjob:1.0.7 openjob/openjob-server:1.0.7

docker push openjob/openjob-server:1.0.7