Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions dagger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ func (h *Headway) TileserverServeContainer(ctx context.Context) *dagger.Containe
WithFile("/app/package.json", h.ServiceDir("tileserver").File("package.json")).
WithFile("/app/yarn.lock", h.ServiceDir("tileserver").File("yarn.lock")).
WithWorkdir("/app").
WithExec([]string{"yarn", "install", "--prod", "--frozen-lockfile"})
WithExec([]string{"yarn", "install", "--prod", "--frozen-lockfile", "--ignore-scripts"}).
WithExec([]string{"sh", "-c", "cd node_modules/sqlite3 && yarn run install"})

builtAssets := h.TileserverAssets(ctx)

Expand Down Expand Up @@ -485,8 +486,10 @@ func (h *Headway) WebBuild(ctx context.Context,
}

return container.
WithExec([]string{"yarn", "install", "--frozen-lockfile"}).
WithExec([]string{"yarn", "install", "--frozen-lockfile", "--ignore-scripts"}).
WithExec([]string{"yarn", "build"}).
// Strip devDependencies from final image
WithExec([]string{"yarn", "install", "--frozen-lockfile", "--ignore-scripts", "--prod"}).
Directory("/www-app/dist/spa")
}

Expand Down
4 changes: 3 additions & 1 deletion dagger/pelias.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ func (h *Headway) Pelias(ctx context.Context) *Pelias {
WithDirectory("generate_config", h.ServiceDir("pelias").Directory("generate_config")).
WithWorkdir("generate_config").
WithFile("areas.csv", h.ServicesDir.File("areas.csv")).
WithExec([]string{"yarn", "install"}).
WithExec([]string{"yarn", "install", "--frozen-lockfile", "--ignore-scripts"}).
WithExec([]string{"yarn", "build"}).
WithExec([]string{"sh", "-c", fmt.Sprintf("bin/generate-pelias-config areas.csv '%s' '%s' > pelias.json", h.Area, countriesStr)}).
// Strip devDependencies from final image
WithExec([]string{"yarn", "install", "--prod", "--frozen-lockfile", "--ignore-scripts"}).
File("pelias.json")

return &Pelias{Config: config, Headway: h}
Expand Down