Repository navigation
Expand file tree
/
Copy pathcompose.vm.dist.yml
More file actions
81 lines (78 loc) · 2.95 KB
/
Copy pathcompose.vm.dist.yml
File metadata and controls
81 lines (78 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# VM-only stack used by Vagrant. Brings up Traefik on :443 with the local
# mkcert cert so https://weleda-webcenter-text-export.test routes to the
# dev container (Vite running inside `nix develop`).
#
# This file is the dist/template; the Vagrantfile copies it to
# `compose.vm.yml` on first boot. Edit `compose.vm.yml` (gitignored) for
# local customisation, or this file for project-wide changes.
#
# Bring it up: docker compose -f compose.vm.yml up
#
# Production simulation is no longer wired through compose — `flake.nix`
# now owns the runtime image. To smoke-test it locally:
# nix build .#dockerImage && docker load < result
# docker run --rm -p 3000:3000 d3strukt0r/weleda-webcenter-text-export:latest
services:
dev:
image: nixos/nix
container_name: weleda-dev
working_dir: /opt/weleda-webcenter-text-export
command:
- nix
- --extra-experimental-features
- nix-command flakes
- develop
- --command
- sh
- -c
- pnpm install && pnpm run dev --host 0.0.0.0
volumes:
- .:/opt/weleda-webcenter-text-export
- node_modules:/opt/weleda-webcenter-text-export/node_modules
# Persist the nix store across container restarts so devShell realisation
# only happens once.
- nix-store:/nix
environment:
NODE_ENV: development
# Lets pnpm purge node_modules non-interactively when the persisted
# volume's layout disagrees with the current lockfile (no TTY here).
CI: "true"
depends_on: [traefik]
labels:
traefik.enable: 'true'
traefik.http.routers.dev.entrypoints: websecure
traefik.http.routers.dev.rule: Host(`weleda-webcenter-text-export.test`)
traefik.http.routers.dev.tls: 'true'
traefik.http.services.dev.loadbalancer.server.port: '5173'
traefik:
image: traefik
init: true
command:
- --api.insecure=true
- --api.dashboard=true
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --providers.file.directory=/etc/traefik/dynamic_conf
- --providers.file.watch=true
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --entrypoints.websecure.address=:443
ports:
- '80:80'
- '443:443'
- '8080:8080'
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./.docker/certs:/etc/ssl/certs/local:ro
- ./.docker/rootfs-local/traefik/etc/traefik/dynamic_conf/conf.yml:/etc/traefik/dynamic_conf/conf.yml:ro
labels:
traefik.enable: 'true'
traefik.http.routers.traefik.entrypoints: websecure
traefik.http.routers.traefik.rule: Host(`traefik.weleda-webcenter-text-export.test`)
traefik.http.routers.traefik.tls: 'true'
traefik.http.routers.traefik.service: api@internal
volumes:
node_modules:
nix-store: