Builds in production
This commit is contained in:
27
docker-compose.yml
Normal file
27
docker-compose.yml
Normal 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'
|
||||||
@@ -25,6 +25,7 @@ export const load: PageServerLoad = ({ fetch, getClientAddress }) => {
|
|||||||
return {
|
return {
|
||||||
config,
|
config,
|
||||||
serviceData,
|
serviceData,
|
||||||
|
location: getClientAddress(),
|
||||||
privateAccess: clientAddressIsPrivate(getClientAddress(), privateConfig)
|
privateAccess: clientAddressIsPrivate(getClientAddress(), privateConfig)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<footer class="flex h-8 w-full flex-row">
|
<footer class="flex h-8 w-full flex-row">
|
||||||
<div class="mx-auto">
|
<div class="mx-auto">
|
||||||
Made with ♥ by atuleu.
|
Made with ♥ by atuleu. Your IP: {data.location}.
|
||||||
{#if data.privateAccess === true}
|
{#if data.privateAccess === true}
|
||||||
Private view
|
Private view
|
||||||
{:else}
|
{:else}
|
||||||
|
|||||||
@@ -6,5 +6,7 @@ export default defineConfig({
|
|||||||
plugins: [ViteYaml(), sveltekit()],
|
plugins: [ViteYaml(), sveltekit()],
|
||||||
test: {
|
test: {
|
||||||
include: ['src/**/*.{test,spec}.{js,ts}']
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||||
}
|
},
|
||||||
|
|
||||||
|
build: { target: 'esnext' }
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user