From 4011c6c157680910e2e041621dea2a8bc084cbc2 Mon Sep 17 00:00:00 2001 From: Carlos Blanco Date: Fri, 16 Feb 2024 19:55:02 -0700 Subject: [PATCH] added carlosrunner --- StagingCarlos/carlosMAUIApp.dockerfile | 21 ----------- StagingCarlos/carlosWebApp.dockerfile | 19 ---------- StagingCarlos/docker-compose.yml | 30 ++++------------ StagingCarlos/init.sql | 50 -------------------------- 4 files changed, 6 insertions(+), 114 deletions(-) delete mode 100644 StagingCarlos/carlosMAUIApp.dockerfile delete mode 100644 StagingCarlos/carlosWebApp.dockerfile delete mode 100644 StagingCarlos/init.sql diff --git a/StagingCarlos/carlosMAUIApp.dockerfile b/StagingCarlos/carlosMAUIApp.dockerfile deleted file mode 100644 index c284986..0000000 --- a/StagingCarlos/carlosMAUIApp.dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM mcr.microsoft.com/dotnet/maui/sdk:latest as build -WORKDIR /MauiTickets - -EXPOSE 8081 - -COPY *.csproj . -RUN dotnet restore - -COPY . . -RUN dotnet build -c Release -o /app/build - -FROM build as publish -RUN dotnet publish -c Release -o /app/publish - -FROM mcr.microsoft.com/dotnet/maui/runtime:latest as runtime - -WORKDIR /app - -COPY --from=publish /app/publish . - -ENTRYPOINT ["dotnet", "MauiTickets.dll"] diff --git a/StagingCarlos/carlosWebApp.dockerfile b/StagingCarlos/carlosWebApp.dockerfile deleted file mode 100644 index 844639d..0000000 --- a/StagingCarlos/carlosWebApp.dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 as build -WORKDIR /BlazorTickets - -EXPOSE 8080 - -COPY *.csproj . -RUN dotnet restore - -COPY . . -RUN dotnet build -c Release -o /app/build - -FROM build as publish -RUN dotnet publish -c Release -o /app/publish - -FROM mcr.microsoft.com/dotnet/aspnet:8.0 as runtime -WORKDIR /app -COPY --from=publish /app/publish . - -ENTRYPOINT ["dotnet", "BlazorTickets.dll"] diff --git a/StagingCarlos/docker-compose.yml b/StagingCarlos/docker-compose.yml index be297eb..36f58b0 100644 --- a/StagingCarlos/docker-compose.yml +++ b/StagingCarlos/docker-compose.yml @@ -6,7 +6,7 @@ networks: services: - postgresql: + carlosdb: image: postgres container_name: postgresql restart: always @@ -19,36 +19,18 @@ services: networks: - Tunnel volumes: - - ./StagingCarlos/init.sql:/docker-entrypoint-initdb.d/init.sql + - ../TestTicket/20240215.01.21.01.sql:/docker-entrypoint-initdb.d/init.sql blazor: container_name: blazor depends_on: - - postgresql - build: - context: ./ - dockerfile: carlosWebApp.dockerfile + - carlosdb + build: .. environment: - ASPNETCORE_ENVIRONMENT=Production - - Postgres=Host=postgresql;Database=postgres;Port=5432;User ID=ticketuser;Password=P@ssword1 + - Postgres=Server=carlosdb;Database=postgres;Port=5432;User ID=ticketuser;Password=P@ssword1 ports: - - "8080:8080" - networks: - - Tunnel - - maui: - container_name: maui_app - depends_on: - - postgresql - - blazor - build: - context: ./ - dockerfile: carlosMAUIApp.dockerfile - environment: - - ASPNETCORE_ENVIRONMENT=Production - - Postgres=Host=postgresql;Database=postgres;Port=5432;User ID=ticketuser;Password=P@ssword1 - ports: - - "8081:8080" + - "5454:8080" networks: - Tunnel diff --git a/StagingCarlos/init.sql b/StagingCarlos/init.sql deleted file mode 100644 index a0c854c..0000000 --- a/StagingCarlos/init.sql +++ /dev/null @@ -1,50 +0,0 @@ --- DROP SCHEMA public; - -CREATE SCHEMA public AUTHORIZATION azure_pg_admin; - --- DROP SEQUENCE public.event_id_seq; - -CREATE SEQUENCE public.event_id_seq - INCREMENT BY 1 - MINVALUE 1 - MAXVALUE 2147483647 - START 1 - CACHE 1 - NO CYCLE; --- DROP SEQUENCE public.ticket_id_seq; - -CREATE SEQUENCE public.ticket_id_seq - INCREMENT BY 1 - MINVALUE 1 - MAXVALUE 2147483647 - START 1 - CACHE 1 - NO CYCLE;-- public."event" definition - --- Drop table - --- DROP TABLE public."event"; - -CREATE TABLE public."event" ( - id serial4 NOT NULL, - event_name varchar(100) NULL, - date_of_event date NULL, - CONSTRAINT event_pkey PRIMARY KEY (id) -); - - --- public.ticket definition - --- Drop table - --- DROP TABLE public.ticket; - -CREATE TABLE public.ticket ( - id serial4 NOT NULL, - event_id int4 NULL, - user_email varchar(100) NULL, - is_scanned bool NULL, - ticketnumber varchar(100) NOT NULL, - CONSTRAINT ticket_pkey PRIMARY KEY (id), - CONSTRAINT ticket_event_id_fkey FOREIGN KEY (event_id) REFERENCES public."event"(id) -); \ No newline at end of file