mirror of
https://github.com/coaidev/coai.git
synced 2025-05-20 05:20:15 +09:00
feat: docker ci/cd workflows
This commit is contained in:
parent
3c68278ed7
commit
56f0994451
26
.github/workflows/docker-cd.yaml
vendored
Normal file
26
.github/workflows/docker-cd.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Docker CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: docker build . --file Dockerfile --tag programzmh/chatnio:stable
|
||||||
|
|
||||||
|
- name: Push to DockerHub
|
||||||
|
run: docker push programzmh/chatnio:stable
|
26
.github/workflows/docker-ci.yaml
vendored
Normal file
26
.github/workflows/docker-ci.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: Docker Image CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build the Docker image
|
||||||
|
run: docker build . --file Dockerfile --tag programzmh/chatnio:latest
|
||||||
|
|
||||||
|
- name: Push to DockerHub
|
||||||
|
run: docker push programzmh/chatnio:latest
|
@ -28,7 +28,7 @@ services:
|
|||||||
- chatnio-network
|
- chatnio-network
|
||||||
|
|
||||||
chatnio:
|
chatnio:
|
||||||
build: .
|
image: programzmh/chatnio
|
||||||
container_name: chatnio
|
container_name: chatnio
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
@ -49,6 +49,8 @@ services:
|
|||||||
REDIS_PASSWORD: ""
|
REDIS_PASSWORD: ""
|
||||||
REDIS_DB: 0
|
REDIS_DB: 0
|
||||||
SERVE_STATIC: "true"
|
SERVE_STATIC: "true"
|
||||||
|
volumes:
|
||||||
|
- ./config.yaml:/config.yaml
|
||||||
networks:
|
networks:
|
||||||
- chatnio-network
|
- chatnio-network
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user