4 Commits

Author SHA1 Message Date
mono
079f4e3806 fix: copy application files directly into image root
- Copy tienda_ilusion contents to /app/ instead of subdirectory
- Remove volume mount from production docker-compose.yml
- Allows deployment without repository dependency

Refs #37
2026-03-30 20:45:45 -05:00
mono
6473a8348c feat: configure docker image deployment with Gitea Container Registry
- Replace local build with pre-built image from Gitea registry
- Add docker-compose.override.yml for local development with Dockerfile
- Add .dockerignore to exclude unnecessary files from build
- Update image reference to gitea.onecluster.org/oneteam/don_confiao_backend:latest

Refs #37
2026-03-30 20:34:32 -05:00
1d7beadf96 Merge pull request 'Agregar método de pago crédito #20' (#36) from add_credit_pay_method_#20 into main
Reviewed-on: #36
2026-03-14 23:46:27 -05:00
mono
5442a52ff6 feat(Payment): add CREDIT payment method 2026-03-14 23:45:52 -05:00
7 changed files with 56 additions and 5 deletions

17
.dockerignore Normal file
View File

@@ -0,0 +1,17 @@
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
*.db
*.sqlite3
.env
.venv
venv/
ENV/
.git/
*.egg-info/
dist/
build/
.coverage
htmlcov/

View File

@@ -5,4 +5,6 @@ WORKDIR /app/
COPY requirements.txt ./ COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
COPY tienda_ilusion/ ./
CMD ["python", "manage.py", "runserver", "0.0.0.0:9090"] CMD ["python", "manage.py", "runserver", "0.0.0.0:9090"]

View File

@@ -0,0 +1,11 @@
services:
django:
build:
context: ./
dockerfile: django.Dockerfile
volumes:
- ./tienda_ilusion:/app/
env_file:
- .env
ports:
- "7000:9090"

View File

@@ -1,12 +1,8 @@
services: services:
django: django:
build: image: gitea.onecluster.org/oneteam/don_confiao_backend:latest
context: ./
dockerfile: django.Dockerfile
env_file: env_file:
- .env - .env
volumes:
- ./tienda_ilusion:/app/
ports: ports:
- "7000:9090" - "7000:9090"

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.0.6 on 2026-03-15 04:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('don_confiao', '0043_customer_address_external_id'),
]
operations = [
migrations.AlterField(
model_name='payment',
name='type_payment',
field=models.CharField(choices=[('CASH', 'Efectivo'), ('CONFIAR', 'Confiar'), ('BANCOLOMBIA', 'Bancolombia'), ('CREDIT', 'Crédito')], default='CASH', max_length=30),
),
migrations.AlterField(
model_name='sale',
name='payment_method',
field=models.CharField(choices=[('CASH', 'Efectivo'), ('CONFIAR', 'Confiar'), ('BANCOLOMBIA', 'Bancolombia'), ('CREDIT', 'Crédito')], default='CASH', max_length=30),
),
]

View File

@@ -10,6 +10,7 @@ class PaymentMethods(models.TextChoices):
CASH = 'CASH', _('Efectivo') CASH = 'CASH', _('Efectivo')
CONFIAR = 'CONFIAR', _('Confiar') CONFIAR = 'CONFIAR', _('Confiar')
BANCOLOMBIA = 'BANCOLOMBIA', _('Bancolombia') BANCOLOMBIA = 'BANCOLOMBIA', _('Bancolombia')
CREDIT = 'CREDIT', _('Crédito')
class Customer(models.Model): class Customer(models.Model):

View File

@@ -21,3 +21,4 @@ class TestPaymentMethods(TestCase, LoginMixin):
self.assertIn('CASH', [method.get('value') for method in methods]) self.assertIn('CASH', [method.get('value') for method in methods])
self.assertIn('CONFIAR', [method.get('value') for method in methods]) self.assertIn('CONFIAR', [method.get('value') for method in methods])
self.assertIn('BANCOLOMBIA', [method.get('value') for method in methods]) self.assertIn('BANCOLOMBIA', [method.get('value') for method in methods])
self.assertIn('CREDIT', [method.get('value') for method in methods])