Builds in production

This commit is contained in:
2023-09-20 14:56:28 +02:00
parent c05de10192
commit 8fcd97e811
4 changed files with 32 additions and 2 deletions

27
docker-compose.yml Normal file
View File

@@ -0,0 +1,27 @@
version: '3.9'
services:
flanders:
build: .
container_name: flanders
environment:
- ADDRESS_HEADER=X-Forwarded-For
- XFF_DEPTH=1
labels:
- traefik.http.routers.flanders.rule=PathPrefix(`/`)
- traefik.http.services.flanders.loadbalancer.server.port=3000
traefik:
image: traefik:latest
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=true
- --entrypoints.web.address=:80
- --api.insecure=true
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: 'unless-stopped'

View File

@@ -25,6 +25,7 @@ export const load: PageServerLoad = ({ fetch, getClientAddress }) => {
return {
config,
serviceData,
location: getClientAddress(),
privateAccess: clientAddressIsPrivate(getClientAddress(), privateConfig)
};
};

View File

@@ -20,7 +20,7 @@
<footer class="flex h-8 w-full flex-row">
<div class="mx-auto">
Made with ♥ by atuleu.
Made with ♥ by atuleu. Your IP: {data.location}.
{#if data.privateAccess === true}
Private view
{:else}

View File

@@ -6,5 +6,7 @@ export default defineConfig({
plugins: [ViteYaml(), sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
},
build: { target: 'esnext' }
});