Commit d3f96a14 authored by Léo Andrès's avatar Léo Andrès
Browse files

Merge branch 'citest' into 'master'

try to fix CI

See merge request OCamlPro/www!2
parents c7d32a7d 74cebe0d
......@@ -16,10 +16,17 @@ workflow:
# unless the opam.locked file has changed.
build:
stage: build
image: registry.ocamlpro.com/ocamlpro/ocaml-docker-images:4.12
image: debian:buster
before_script:
- opam switch create . ocaml-system --deps-only --locked
- opam clean --switch-cleanup
- apt update
- apt install -yqq --no-install-recommends ca-certificates curl opam git pkg-config m4
- opam init --disable-sandboxing --bare -ya
- opam switch create ocaml-base-compiler.4.12.0
- eval "$(opam env)"
- opam pin add . -y --no-action
- opam install opam-depext
- opam depext -y ocpsite
- opam install ./*.opam -y --deps-only --with-test --with-doc
script:
- opam exec -- dune build --profile release @all
- opam exec -- dune runtest
......@@ -45,9 +52,11 @@ make-image:
# Here we inherit from nginx and just add the contents of our web-app
- |
echo "\
FROM alpine:3.11
ADD server.exe /usr/bin
RUN apk add libev
FROM bitnami/nginx:latest
ADD server.exe /opt/bitnami/nginx/sbin/nginx
USER 0
RUN apt update && apt install -yqq libev4
USER 1001
" > $DOCKERFILE
# Deployments are pre-defined in the "dev" environment; they will be stopped
......@@ -57,7 +66,5 @@ make-image:
# the corresponding DNS record as "CNAME" to "a.ocaml.pro"
deploy-prod:
extends: .deploy-prod
script:
- /usr/bin/server.exe
variables:
PUBLIC_HOST: www.ocamlpro.com
......@@ -10,7 +10,7 @@
(name ocpsite)
(depends
(ocaml
(>= 4.12))
(>= 4.10))
(dream
(>= 1.0.0~alpha2))
(crunch
......
......@@ -3,7 +3,7 @@ opam-version: "2.0"
license: "ISC"
depends: [
"dune" {>= "2.0"}
"ocaml" {>= "4.12"}
"ocaml" {>= "4.10"}
"dream" {>= "1.0.0~alpha2"}
"crunch" {>= "3.2.0"}
"omd" {>= "2.0.0~alpha2"}
......
......@@ -31,7 +31,8 @@ let given_article path =
end
let () =
Dream.run @@ Dream.logger
Dream.run ~interface:"0.0.0.0"
@@ Dream.logger
@@ Dream.router
[ Dream.get "/assets/**" (Dream.static ~loader:asset_loader "")
; Dream.get "/blog/assets/**" (Dream.static ~loader:blog_asset_loader "")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment