change port
This commit is contained in:
@@ -1,8 +1,35 @@
|
|||||||
version: "3.8"
|
steps:
|
||||||
services:
|
test:
|
||||||
web:
|
image: python:3.11
|
||||||
image: flask-demo:latest
|
commands:
|
||||||
container_name: flask-demo
|
- pip install -r requirements.txt
|
||||||
ports:
|
- pytest -q
|
||||||
- "8888:8888"
|
|
||||||
restart: unless-stopped
|
build:
|
||||||
|
image: docker:27-cli
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
environment:
|
||||||
|
IMAGE: flask-demo:latest
|
||||||
|
commands:
|
||||||
|
- docker build -t $IMAGE .
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
image: docker:27-cli
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker compose up -d
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
||||||
|
# объявление хостового тома для монтирования docker.sock
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
Reference in New Issue
Block a user