Compare commits

...

3 Commits

Author SHA1 Message Date
steinhelge 1ff03552ea config: Adjust Nginx listening address, explicitly set Traefik service ports for dev and prod, and rename the dev connection string key.
Build & Push Hospitality / build-and-push (push) Successful in 4m39s
2025-11-26 21:48:02 +01:00
steinhelge 63eb33a8c9 refactor: enclose CORS policy configuration in a block statement
Build & Push Hospitality / build-and-push (push) Successful in 3m13s
2025-11-26 15:47:06 +01:00
steinhelge f5f56b0407 fix: Correct api service indentation and remove inline comments.
Build & Push Hospitality / build-and-push (push) Failing after 3m19s
2025-11-26 15:36:24 +01:00
4 changed files with 10 additions and 7 deletions
+2
View File
@@ -64,12 +64,14 @@ builder.Services.AddScoped<ITransactionService, TransactionService>();
// Add CORS
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowFrontend", policy =>
{
policy.SetIsOriginAllowed(origin => true) // Allow any origin
.AllowAnyHeader()
.AllowAnyMethod();
});
});
var app = builder.Build();
@@ -27,7 +27,7 @@ services:
restart: unless-stopped
environment:
ASPNETCORE_URLS: http://0.0.0.0:8080
ConnectionStrings__Default: "Host=db;Port=5432;Database=hospitality_dev;Username=hospitality_dev;Password=devpassword"
ConnectionStrings__DefaultConnection: "Host=db;Port=5432;Database=hospitality_dev;Username=hospitality_dev;Password=devpassword"
depends_on:
- db
networks:
@@ -56,6 +56,7 @@ services:
- "traefik.http.routers.hospitality-dev.rule=Host(`hospitality-dev.theriise.net`)"
- "traefik.http.routers.hospitality-dev.entrypoints=websecure"
- "traefik.http.routers.hospitality-dev.tls=true"
- "traefik.http.services.hospitality-dev.loadbalancer.server.port=80"
volumes:
hospitality-dev-db-data:
@@ -21,7 +21,7 @@ services:
networks:
- hospitality-net
api:
api:
image: gitea.theriise.net/steinhelge/hospitality-api:latest
container_name: hospitality-api
restart: unless-stopped
@@ -32,16 +32,15 @@ services:
- db
networks:
- hospitality-net
- edge # eller hva prod-nettverket ditt heter
- edge
labels:
- "traefik.enable=true"
- "traefik.docker.network=edge"
- "traefik.http.routers.hospitality-api.rule=Host(`hospitality-api.theriise.net`)" # prod-domene
- "traefik.http.routers.hospitality-api.rule=Host(`hospitality-api.theriise.net`)"
- "traefik.http.routers.hospitality-api.entrypoints=websecure"
- "traefik.http.routers.hospitality-api.tls=true"
- "traefik.http.services.hospitality-api.loadbalancer.server.port=8080"
web:
image: gitea.theriise.net/steinhelge/hospitality-frontend:latest
container_name: hospitality-frontend
@@ -57,6 +56,7 @@ services:
- "traefik.http.routers.hospitality.rule=Host(`hospitality.theriise.net`)"
- "traefik.http.routers.hospitality.entrypoints=websecure"
- "traefik.http.routers.hospitality.tls=true"
- "traefik.http.services.hospitality.loadbalancer.server.port=80"
volumes:
hospitality-db-data:
+2 -2
View File
@@ -1,6 +1,6 @@
server {
listen 80;
server_name localhost;
listen 0.0.0.0:80;
server_name _;
root /usr/share/nginx/html;
index index.html;