File tree Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @quassel/backend " : patch
3
+ ---
4
+
5
+ Enhance host configuration
Original file line number Diff line number Diff line change 1
1
export const configuration = ( ) => ( {
2
+ host : process . env . HOST || "0.0.0.0" ,
2
3
port : parseInt ( process . env . PORT || "" ) || 3000 ,
3
4
cors : {
4
5
origin : process . env . CORS_ORIGIN || "http://localhost:3001" ,
Original file line number Diff line number Diff line change @@ -34,6 +34,6 @@ async function bootstrap() {
34
34
35
35
SwaggerModule . setup ( "api" , app , document ) ;
36
36
37
- await app . listen ( { host : "0.0.0.0" , port : configService . get ( "port" ) } ) ;
37
+ await app . listen ( { host : configService . get ( "host" ) , port : configService . get ( "port" ) } ) ;
38
38
}
39
39
bootstrap ( ) ;
Original file line number Diff line number Diff line change @@ -106,13 +106,14 @@ The following sources were used:
106
106
sed -i " s/example.com/example.com/g" docker-compose.yaml
107
107
` ` `
108
108
109
- 1. Set environment variables in ` docker-compose.yaml` :
110
- - ` SESSION_SECRET` to a 32byte random hex string with ` openssl rand -hex 32`
111
- - ` SESSION_SALT` to a 8byte random hex string with ` openssl rand -hex 8`
112
- - ` DATABASE_PASSWORD` set a more secure password for the database
113
109
1. Change contact email for SSL certificates in ` traefik.yaml`
114
110
1. Configure the following environment variables in ` docker-compose.yaml` :
115
- - ** todo**
111
+ - ** backend** :
112
+ - ` SESSION_SECRET` to a 32byte random hex string with ` openssl rand -hex 32`
113
+ - ` SESSION_SALT` to a 8byte random hex string with ` openssl rand -hex 8`
114
+ - ` DATABASE_PASSWORD` set a more secure password for the database
115
+ - ** frontend** :
116
+ - ` API_URL` set to a escaped URL so it works with sed (e.g. " https:\\ /\\ /api.test.example.com" )
116
117
1. Run application system
117
118
118
119
` ` ` bash
@@ -139,7 +140,22 @@ The following sources were used:
139
140
140
141
1. Migrate database
141
142
143
+ ` ` ` bash
144
+ docker exec -it $( docker ps -f name=backend -q) npx mikro-orm migration:up
145
+ ` ` `
146
+
147
+ 1. Seed database
148
+
149
+ ` ` ` bash
150
+ docker exec -it $( docker ps -f name=backend -q) npx mikro-orm seeder:run
151
+ ` ` `
152
+
142
153
# ## Maintain application system
143
154
144
155
- Create a database backup
156
+
157
+ ` ` ` bash
158
+ docker exec -it $( docker ps -f name=database -q) pg_dumpall -c -U postgres > quassel_dump_` date +%d-%m-%Y" _" %H_%M_%S` .sql
159
+ ` ` `
160
+
145
161
- Archive storage
You can’t perform that action at this time.
0 commit comments