first pass
This commit is contained in:
44
templates/python/standard/.dockerignore.template
Normal file
44
templates/python/standard/.dockerignore.template
Normal file
@@ -0,0 +1,44 @@
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
.Python
|
||||
.git
|
||||
.gitignore
|
||||
.env
|
||||
.env.local
|
||||
*.tar
|
||||
*.tar.gz
|
||||
|
||||
# Virtual environments
|
||||
venv
|
||||
.venv
|
||||
env
|
||||
ENV
|
||||
|
||||
# IDE
|
||||
.vscode
|
||||
.idea
|
||||
*.swp
|
||||
|
||||
# Test & Coverage
|
||||
.pytest_cache
|
||||
.coverage
|
||||
htmlcov
|
||||
.tox
|
||||
|
||||
# Documentation
|
||||
README.md
|
||||
README.DOCKER.md
|
||||
docs
|
||||
|
||||
# Docker files
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
.dockerignore
|
||||
docker-deployment.json
|
||||
*.ps1
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
logs
|
||||
18
templates/python/standard/Dockerfile.template
Normal file
18
templates/python/standard/Dockerfile.template
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM python:{{PYTHON_VERSION}}-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application
|
||||
COPY . .
|
||||
|
||||
# Set environment
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV PORT={{PORT}}
|
||||
|
||||
EXPOSE {{PORT}}
|
||||
|
||||
CMD ["python", "{{ENTRY_POINT}}"]
|
||||
20
templates/python/standard/docker-compose.yml.template
Normal file
20
templates/python/standard/docker-compose.yml.template
Normal file
@@ -0,0 +1,20 @@
|
||||
services:
|
||||
{{PROJECT_NAME}}:
|
||||
build: .
|
||||
container_name: {{PROJECT_NAME}}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${HOST_PORT:-{{PORT}}}:{{PORT}}"
|
||||
{{#if USE_ENV_FILE}}
|
||||
env_file:
|
||||
- .env
|
||||
{{/if}}
|
||||
environment:
|
||||
PYTHONUNBUFFERED: 1
|
||||
PORT: {{PORT}}
|
||||
{{#if HAS_VOLUMES}}
|
||||
volumes:
|
||||
{{#each VOLUMES}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
Reference in New Issue
Block a user