mirror of
https://github.com/cupcakearmy/tumbo.git
synced 2025-09-05 18:20:43 +00:00
examples
This commit is contained in:
13
examples/full/build/Dockerfile.j2
Normal file
13
examples/full/build/Dockerfile.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM python:{{ python_version }}-{{base_image}}
|
||||
|
||||
RUN pip install termcolor=={{ package_version }}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
{% if package_version == '1.1.0' %}
|
||||
COPY ./new.py main.py
|
||||
{% else %}
|
||||
COPY ./old.py main.py
|
||||
{% endif %}
|
||||
|
||||
CMD [ "python", "main.py" ]
|
3
examples/full/build/new.py
Normal file
3
examples/full/build/new.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from termcolor import cprint
|
||||
|
||||
cprint('Hello 👋', 'blue', attrs=['bold'])
|
3
examples/full/build/old.py
Normal file
3
examples/full/build/old.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from termcolor import colored
|
||||
|
||||
print(colored('Hello 👋', 'blue', attrs=['bold']))
|
14
examples/full/registry/docker-compose.yml
Normal file
14
examples/full/registry/docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
registry:
|
||||
image: registry
|
||||
container_name: registry
|
||||
ports:
|
||||
- 5000:5000
|
||||
volumes:
|
||||
- ./htpasswd:/auth/htpasswd
|
||||
environment:
|
||||
- REGISTRY_AUTH=htpasswd
|
||||
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
|
||||
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
|
2
examples/full/registry/htpasswd
Normal file
2
examples/full/registry/htpasswd
Normal file
@@ -0,0 +1,2 @@
|
||||
foo:$2y$05$dxXE5QaBKd5eV0gLBxFJtOJpAHKEusdZfPC2Ucssyg3s/2YjoRIXW
|
||||
|
25
examples/full/spec.yml
Normal file
25
examples/full/spec.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
variables:
|
||||
python_version:
|
||||
- 3.8
|
||||
- 3.7
|
||||
- 3.6
|
||||
- 3.5
|
||||
base_image:
|
||||
- alpine
|
||||
- slim
|
||||
package_version:
|
||||
- 1.1.0
|
||||
- 1.0.1
|
||||
- 1.0.0
|
||||
|
||||
context: ./build
|
||||
recipe: './Dockerfile.j2'
|
||||
tag: "{{package_version}}:{{base_image}}-{{python_version}}"
|
||||
|
||||
parallel: no
|
||||
push: yes
|
||||
run: yes
|
||||
registry:
|
||||
username: foo
|
||||
password: bar
|
||||
host: localhost:5000
|
Reference in New Issue
Block a user