17 lines
317 B
Python
17 lines
317 B
Python
import re
|
|
|
|
with open('docker-compose.yml', 'r') as f:
|
|
content = f.read()
|
|
|
|
new_service = """ tax-api:
|
|
build: ./tax_api
|
|
ports:
|
|
- "8001:8000"
|
|
restart: unless-stopped
|
|
|
|
celery:"""
|
|
content = content.replace(' celery:', new_service)
|
|
|
|
with open('docker-compose.yml', 'w') as f:
|
|
f.write(content)
|