Fix deploy scripts

main
Eric Ihli 4 years ago
parent 9b6f26ba0b
commit be67fcc9ec

@ -17,8 +17,6 @@ build: FORCE
FORCE:
push: FORCE
rsync -aP web/LottoEmail.jar root@165.227.27.168:/root
rsync -aP web/darklimericks.jar root@165.227.16.47:/root/darklimericks/web/
deploy: LottoEmail.jar
ssh root@165.227.27.168 java -jar /root/LottoEmail.jar
# end

@ -1,5 +1,6 @@
#+TITLE: Database setup
This directory contains necessities for initializing and running a database
locally inside a docker container.
@ -23,7 +24,7 @@ Running requires the following environment variables.
#+BEGIN_SRC sh
docker build -t db .
docker build -t darklimericks-db .
#+END_SRC
#+BEGIN_SRC sh :tangle run.sh :tangle-mode (identity #o755)
@ -40,7 +41,7 @@ docker run \
-e POSTGRES_USER=$POSTGRES_USER \
-v $PGDATA:/var/lib/postgresql/data \
-p 5432:5432 \
db
darklimericks-db
#+END_SRC
#+BEGIN_SRC sh

@ -1,14 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
#!/usr/bin/env sh
PGDATA=${PGDATA:-"$(pwd)/data/dev"}
POSTGRES_USER=${POSTGRES_USER:-"dev"}
POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-"dev"}
docker run \
--name darklimericks-db \
--name db \
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
-e POSTGRES_USER=$POSTGRES_USER \
-v $PGDATA:/var/lib/postgresql/data \
-p 127.0.0.1:5432:5432 \
-p 5432:5432 \
darklimericks-db

@ -11,8 +11,8 @@ KVDATA=${KVDATA:-"$(pwd)/data/dev"}
docker run \
-p 127.0.0.1:6379:6379 \
-v $KVDATA:/data \
--name darklimericks-kv \
redis --appendonly yes
--name kv \
darklimericks-kv --appendonly yes
#+END_SRC
#+BEGIN_SRC sh :tangle start.sh :tangle-mode (identity #o755)

@ -6,5 +6,5 @@ KVDATA=${KVDATA:-"$(pwd)/data/dev"}
docker run \
-p 127.0.0.1:6379:6379 \
-v $KVDATA:/data \
--name darklimericks-kv \
redis --appendonly yes
--name kv \
darklimericks-kv --appendonly yes

@ -18,10 +18,12 @@
(defn -main []
(try
(let [system (->> "server/config.edn"
(let [config (->> "server/config.edn"
io/resource
slurp
ig/read-string
ig/read-string)
_ (ig/load-namespaces config)
system (-> config
ig/prep
ig/init)]
(timbre/info "Running with config: server/config.edn" )
@ -30,3 +32,12 @@
(.printStackTrace e)
(System/exit 1))))
(comment
(def m (-main))
(->> "server/config.edn"
io/resource
slurp
ig/read-string
ig/load-namespaces
)
)

@ -1,6 +1,5 @@
(ns com.darklimericks.server.limericks
(:require [clojure.string :as string]
[clojure.core.async :as async]
[reitit.core :as reitit]
[com.darklimericks.db.artists :as artists]
[com.darklimericks.db.albums :as albums]

Loading…
Cancel
Save