Skip to content

Commit

Permalink
Connect Ore to the Docker DB
Browse files Browse the repository at this point in the history
Signed-off-by: Jadon Fowler <[email protected]>
  • Loading branch information
phase committed Jul 17, 2018
1 parent 8b5c4cb commit 024ff5e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
1 change: 0 additions & 1 deletion .docker/db/init.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

create database spongeauth;
create role spongeauth with login password 'spongeauth';
4 changes: 2 additions & 2 deletions conf/application.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ application {
uploadsDir = ${?UPLOADS_DIR}

# Add a dot at the start of the url to trust all subdomains
trustedUrlHosts = [ ".spongepowered.org" ]
trustedUrlHosts = [ ".spongepowered.org", "spongeauth" ]

fakeUser {
enabled = false
Expand Down Expand Up @@ -173,7 +173,7 @@ slick.dbs.default {
url = ${?JDBC_DATABASE_URL}
user = "root"
user = ${?JDBC_DATABASE_USERNAME}
password = "ore"
password = ""
password = ${?JDBC_DATABASE_PASSWORD}
}
}
Expand Down
10 changes: 3 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: "2"

#volumes:
# ore-db:

services:
app:
build: .
Expand All @@ -15,14 +12,13 @@ services:
db:
build: '.docker/db/'
restart: always
# volumes:
# - ore-db:/var/lib/postgresql
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: ore
POSTGRES_PASSWORD: ""
POSTGRES_DB: ore
spongeauth:
image: spongepowered/spongeauth
depends_on:
- 'db'

ports:
- "8000:8000"
6 changes: 2 additions & 4 deletions docker.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh

#groupadd -g "$(stat -c '%g' /home/play/ore/app)" -o spongeauth
#useradd -u "$(stat -c '%u' /home/play/ore/app)" -g spongeauth -o -m spongeauth

activator run
# We want to connect to db/ore
env JDBC_DATABASE_URL="jdbc:postgresql://db/ore" SPONGE_AUTH_URL="http://spongeauth:8000" activator run

0 comments on commit 024ff5e

Please sign in to comment.