17626df722
Use Traefik as a local reverse proxy so that the site can be accessed from http://oliverdavies.localhost rather than http://localhost:8000, which is the default for Sculpin. I've also overridden the command used for the app service so that it exposes port 80 and serves the site on that port, as well as configuring the URL to match within the generated output.
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
version: '2.4'
|
|
|
|
services:
|
|
proxy:
|
|
image: traefik:v2.0-alpine
|
|
command:
|
|
- --api.insecure=true
|
|
- --providers.docker
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
ports:
|
|
- 80:80
|
|
- 8080:8080
|
|
labels:
|
|
- "traefik.enable=false"
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: tools/docker/images/Dockerfile
|
|
target: app
|
|
expose:
|
|
- 80
|
|
command:
|
|
- generate
|
|
- --server
|
|
- --watch
|
|
- --port
|
|
- '80'
|
|
- --url
|
|
- oliverdavies.localhost
|
|
volumes:
|
|
- assets:/app/source/build
|
|
- /app/output_dev
|
|
- .:/app
|
|
labels:
|
|
- "traefik.http.routers.oliverdavies.rule=Host(`oliverdavies.localhost`)"
|
|
|
|
assets:
|
|
image: node:14
|
|
volumes:
|
|
- assets:/node/source/build
|
|
- /node/node_modules
|
|
- ./assets:/node/assets
|
|
- ./package.json:/node/package.json
|
|
- ./package-lock.json:/node/package-lock.json
|
|
- ./postcss.config.js:/node/postcss.config.js
|
|
- ./source:/node/source
|
|
- ./tailwind.config.js:/node/tailwind.config.js
|
|
- ./tools/tailwindcss:/node/tools/tailwindcss
|
|
- ./webpack.config.js:/node/webpack.config.js
|
|
entrypoint: npm
|
|
command: run watch
|
|
labels:
|
|
- "traefik.enable=false"
|
|
|
|
volumes:
|
|
assets:
|