Anooj commited on
Commit
4260c19
β€’
1 Parent(s): 03716d5

get running locally

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -3
  2. src/app.jl β†’ app.jl +3 -1
Dockerfile CHANGED
@@ -10,9 +10,11 @@ USER genie
10
  EXPOSE 8000
11
  EXPOSE 80
12
  ENV JULIA_DEPOT_PATH "/home/genie/.julia"
13
- ENV GENIE_ENV "prod"
 
 
 
14
 
15
  RUN julia -e 'using Pkg; Pkg.activate("."); Pkg.add("Stipple"); Pkg.precompile()'
16
 
17
-
18
- CMD julia --project -e 'using Pkg; Pkg.instantiate(); include("src/app.jl");'
 
10
  EXPOSE 8000
11
  EXPOSE 80
12
  ENV JULIA_DEPOT_PATH "/home/genie/.julia"
13
+ ENV GENIE_ENV "dev"
14
+ ENV GENIE_HOST "0.0.0.0"
15
+ ENV PORT "8000"
16
+ ENV WSPORT "8000"
17
 
18
  RUN julia -e 'using Pkg; Pkg.activate("."); Pkg.add("Stipple"); Pkg.precompile()'
19
 
20
+ ENTRYPOINT julia --project -e 'using Pkg; Pkg.instantiate(); using Genie; Genie.loadapp(); up(async=false);;'
 
src/app.jl β†’ app.jl RENAMED
@@ -1,3 +1,4 @@
 
1
  using Stipple
2
 
3
  @reactive mutable struct Name <: ReactiveModel
@@ -24,4 +25,5 @@ route("/") do
24
  html(ui(model), context = @__MODULE__)
25
  end
26
 
27
- up() # or `up(open_browser = true)` to automatically open a browser window/tab when launching the app
 
 
1
+ module App
2
  using Stipple
3
 
4
  @reactive mutable struct Name <: ReactiveModel
 
25
  html(ui(model), context = @__MODULE__)
26
  end
27
 
28
+ end
29
+ #up() # or `up(open_browser = true)` to automatically open a browser window/tab when launching the app