File tree 4 files changed +26
-4
lines changed
4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -22,4 +22,3 @@ SYNC_INSTALLERS_NAME=INSTALLERS-edt
22
22
# Terrastories ENV
23
23
MAPBOX_STYLE = mapbox://styles/mapbox/light-v10
24
24
MAPBOX_ACCESS_TOKEN = your pk token here
25
- DB_USER_PASSWORD = postgres
Original file line number Diff line number Diff line change @@ -106,18 +106,20 @@ services:
106
106
ports :
107
107
- 5432:5432
108
108
environment :
109
- POSTGRES_PASSWORD : ${DB_USER_PASSWORD}
109
+ POSTGRES_USER : postgres
110
+ POSTGRES_PASSWORD : postgres
111
+ POSTGRES_DB : terrastories
110
112
volumes :
111
113
- " postgres_data:/var/lib/postgresql/data"
112
114
restart : unless-stopped
113
115
terrastories :
114
- image : terrastories /terrastories
116
+ build : ../../services /terrastories
115
117
ports :
116
118
- 8083:3000
117
119
depends_on :
118
120
- db
119
121
environment :
120
- DB_USER_PASSWORD : ${DB_USER_PASSWORD}
122
+ DATABASE_URL : postgres://postgres:postgres@db:5432/terrastories
121
123
RAILS_ENV : offline
122
124
CHOKIDAR_USEPOLLING : ' true'
123
125
USE_LOCAL_MAP_SERVER : ' true'
Original file line number Diff line number Diff line change
1
+ FROM terrastories/terrastories:latest
2
+ COPY start.sh /srv
3
+ ENTRYPOINT ["sh" , "/srv/start.sh" ]
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ file=firstboot
4
+
5
+ if [ ! -e " $file " ] ; then
6
+ echo " First run!"
7
+ echo " ================================"
8
+ echo " Running migration"
9
+ bin/rails db:migrate db:seed
10
+ yarn
11
+ touch " $file "
12
+ fi
13
+
14
+ if [ ! -w " $file " ] ; then
15
+ echo " Migration already happened!"
16
+ exit 1
17
+ fi
18
+ scripts/server
You can’t perform that action at this time.
0 commit comments