Unverified Commit 74cebe0d authored by zapashcanon's avatar zapashcanon
Browse files

fix CI

parent f54711f5
...@@ -16,10 +16,17 @@ workflow: ...@@ -16,10 +16,17 @@ workflow:
# unless the opam.locked file has changed. # unless the opam.locked file has changed.
build: build:
stage: build stage: build
image: registry.ocamlpro.com/ocamlpro/ocaml-docker-images:4.12 image: debian:buster
before_script: before_script:
- opam switch create . ocaml-system --deps-only --locked - apt update
- opam clean --switch-cleanup - 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: script:
- opam exec -- dune build --profile release @all - opam exec -- dune build --profile release @all
- opam exec -- dune runtest - opam exec -- dune runtest
...@@ -45,9 +52,11 @@ make-image: ...@@ -45,9 +52,11 @@ make-image:
# Here we inherit from nginx and just add the contents of our web-app # Here we inherit from nginx and just add the contents of our web-app
- | - |
echo "\ echo "\
FROM alpine:3.11 FROM bitnami/nginx:latest
ADD server.exe /usr/bin ADD server.exe /opt/bitnami/nginx/sbin/nginx
RUN apk add libev USER 0
RUN apt update && apt install -yqq libev4
USER 1001
" > $DOCKERFILE " > $DOCKERFILE
# Deployments are pre-defined in the "dev" environment; they will be stopped # Deployments are pre-defined in the "dev" environment; they will be stopped
...@@ -57,7 +66,5 @@ make-image: ...@@ -57,7 +66,5 @@ make-image:
# the corresponding DNS record as "CNAME" to "a.ocaml.pro" # the corresponding DNS record as "CNAME" to "a.ocaml.pro"
deploy-prod: deploy-prod:
extends: .deploy-prod extends: .deploy-prod
script:
- /usr/bin/server.exe
variables: variables:
PUBLIC_HOST: www.ocamlpro.com PUBLIC_HOST: www.ocamlpro.com
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
(name ocpsite) (name ocpsite)
(depends (depends
(ocaml (ocaml
(>= 4.12)) (>= 4.10))
(dream (dream
(>= 1.0.0~alpha2)) (>= 1.0.0~alpha2))
(crunch (crunch
......
...@@ -3,7 +3,7 @@ opam-version: "2.0" ...@@ -3,7 +3,7 @@ opam-version: "2.0"
license: "ISC" license: "ISC"
depends: [ depends: [
"dune" {>= "2.0"} "dune" {>= "2.0"}
"ocaml" {>= "4.12"} "ocaml" {>= "4.10"}
"dream" {>= "1.0.0~alpha2"} "dream" {>= "1.0.0~alpha2"}
"crunch" {>= "3.2.0"} "crunch" {>= "3.2.0"}
"omd" {>= "2.0.0~alpha2"} "omd" {>= "2.0.0~alpha2"}
......
...@@ -12,7 +12,8 @@ let page path = ...@@ -12,7 +12,8 @@ let page path =
| Some page -> Some (Omd.of_string page |> Omd.to_html) | Some page -> Some (Omd.of_string page |> Omd.to_html)
let () = let () =
Dream.run @@ Dream.logger Dream.run ~interface:"0.0.0.0"
@@ Dream.logger
@@ Dream.router @@ Dream.router
[ Dream.get "/assets/**" (Dream.static ~loader:asset_loader "") [ Dream.get "/assets/**" (Dream.static ~loader:asset_loader "")
; Dream.get "/" (fun _request -> ; Dream.get "/" (fun _request ->
......
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