Skip to content

Commit

Permalink
Merge pull request #3 from Orcpub/develop
Browse files Browse the repository at this point in the history
Pull from Orcpub
  • Loading branch information
John Liss authored Jan 16, 2019
2 parents 2179b1f + a0eb534 commit b2f9821
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 20 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This is the code for OrcPub2.com. Many, many people have expressed interest in helping out or checking out the code, so I have decided to make that possible by open sourcing it.

## Running

To run a local instance of Orcpub, all you need is Docker, docker-compose, and the `docker-compose.yml` file and an SSL certificate. Simply edit the paths to the SSL certificate and key in the `web** service definition and run the following:

docker-compose pull
docker-compose up -d

**NOTE:** If you need a quick SSL certificate, the script at `deploy/snakeoil.sh` will generate one. Links to Docker installation can be found [below](#with-docker).

## Getting Started with Development

### With docker
Expand Down
1 change: 1 addition & 0 deletions deploy/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
server {
listen 80;
listen 443 ssl;
server_name localhost;

Expand Down
16 changes: 9 additions & 7 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
version: '3'
services:
orcpub:
image: demonsthere/orcpub:orcpub
# build:
# context: docker/orcpub
# args:
# REPO: Orcpub
# BRANCH: develop
image: orcpub/orcpub:orcpub
build:
context: .
dockerfile: docker/orcpub/Dockerfile
environment:
PORT: 8890
EMAIL_SERVER_URL: ''
Expand All @@ -21,7 +19,10 @@ services:
- datomic
restart: always
datomic:
image: demonsthere/orcpub:datomic
image: orcpub/orcpub:datomic
build:
context: .
dockerfile: docker/datomic/Dockerfile
volumes:
- ./data:/data
restart: always
Expand All @@ -36,3 +37,4 @@ services:
- ./deploy/snakeoil.key:/etc/nginx/snakeoil.key
depends_on:
- orcpub
restart: always
2 changes: 1 addition & 1 deletion docker/datomic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt-get update &&\
ADD https://my.datomic.com/downloads/free/${DATOMIC_VERSION} /tmp/datomic.zip

RUN unzip /tmp/datomic.zip && rm /tmp/datomic.zip &&\
mv datomic-free-${DATOMIC_VERSION} datomic
mv datomic-free-${DATOMIC_VERSION} /datomic
ADD ./docker/datomic/transactor.properties /datomic/transactor.properties

VOLUME /data
Expand Down
10 changes: 5 additions & 5 deletions docker/orcpub/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM clojure:openjdk-8-lein as builder
MAINTAINER daemonsthere@gmail.com

ARG REPO="Orcpub"
ARG BRANCH="develop"
# Build cache layer
WORKDIR /orcpub
COPY project.clj /orcpub/
RUN lein deps

# Get orcpub source
ADD ./ /orcpub
WORKDIR /orcpub
RUN printenv &&\
lein uberjar

FROM openjdk:8-jre-alpine as runner
MAINTAINER daemonsthere@gmail.com

COPY --from=builder /opt/orcpub/target/orcpub.jar /orcpub.jar
COPY --from=builder /orcpub/target/orcpub.jar /orcpub.jar

ENTRYPOINT ["java", "-jar"]
CMD ["/orcpub.jar"]
2 changes: 1 addition & 1 deletion src/clj/orcpub/email.clj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{:user (environ/env :email-access-key)
:pass (environ/env :email-secret-key)
:host (environ/env :email-server-url)
:port (Integer/parseInt (environ/env :email-server-port))})
:port (Integer/parseInt (or (environ/env :email-server-port) "587"))})

(defn send-verification-email [base-url {:keys [email username first-and-last-name]} verification-key]
(postal/send-message (email-cfg)
Expand Down
8 changes: 4 additions & 4 deletions src/cljc/orcpub/dnd/e5/views_2.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

(defn legal-footer []
[:div.m-l-15.m-b-10.m-t-10.t-a-l
[:span "© 2018 OrcPub"]
[:span "© 2019 OrcPub"]
[:a.m-l-5 {:href "/terms-of-use" :target :_blank} "Terms of Use"]
[:a.m-l-5 {:href "/privacy-policy" :target :_blank} "Privacy Policy"]])

Expand All @@ -65,8 +65,8 @@
[:a {:style (style orange-style) :href "/privacy-policy" :target :_blank} "Privacy Policy"]
[:a.m-l-5 {:style (orange-style {:margin-left "5px"}) :href "/terms-of-use" :target :_blank} "Terms of Use"]]
[:div.legal-footer
[:p "© 2018 OrcPub" [:span {:style (style {:margin-left "20px"})} "Contact: " [:a {:href "mailto:redorc@orcpub.com"} "redorc@orcpub.com"]]]
[:p "Wizards of the Coast, Dungeons & Dragons, D&D, and their logos are trademarks of Wizards of the Coast LLC in the United States and other countries. © 2017 Wizards. All Rights Reserved. OrcPub.com is not affiliated with, endorsed, sponsored, or specifically approved by Wizards of the Coast LLC."]]])
[:p "© 2019 OrcPub" [:span {:style (style {:margin-left "20px"})} "Contact: " [:a {:href "mailto:redorc@orcpub.com"} "redorc@orcpub.com"]]]
[:p "Wizards of the Coast, Dungeons & Dragons, D&D, and their logos are trademarks of Wizards of the Coast LLC in the United States and other countries. © 2019 Wizards. All Rights Reserved. OrcPub.com is not affiliated with, endorsed, sponsored, or specifically approved by Wizards of the Coast LLC."]]])

(defn splash-page []
[:div.app
Expand All @@ -93,7 +93,7 @@
:font-weight :bold
:font-size "14px"
:height "48px"})}
"version 2.0"]
"version 2.0 - community edition"]
[:div
{:style (style
{:display :flex
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/orcpub/dnd/e5/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,8 @@
[:a.orange {:href "/privacy-policy" :target :_blank} "Privacy Policy"]
[:a.orange.m-l-5 {:href "/terms-of-use" :target :_blank} "Terms of Use"]]
[:div.legal-footer
[:p "© 2018 OrcPub" [:span.m-l-20 "Contact: " [:a {:href "mailto:redorc@orcpub.com"} "redorc@orcpub.com"]]]
[:p "Wizards of the Coast, Dungeons & Dragons, D&D, and their logos are trademarks of Wizards of the Coast LLC in the United States and other countries. © 2018 Wizards. All Rights Reserved. OrcPub.com is not affiliated with, endorsed, sponsored, or specifically approved by Wizards of the Coast LLC."]]]
[:p "© 2019 OrcPub" [:span.m-l-20 "Contact: " [:a {:href "mailto:redorc@orcpub.com"} "redorc@orcpub.com"]]]
[:p "Wizards of the Coast, Dungeons & Dragons, D&D, and their logos are trademarks of Wizards of the Coast LLC in the United States and other countries. © 2019 Wizards. All Rights Reserved. OrcPub.com is not affiliated with, endorsed, sponsored, or specifically approved by Wizards of the Coast LLC."]]]
[debug-data]]]])]))

(def row-style
Expand Down

0 comments on commit b2f9821

Please sign in to comment.