File tree Expand file tree Collapse file tree 6 files changed +56
-41
lines changed Expand file tree Collapse file tree 6 files changed +56
-41
lines changed Original file line number Diff line number Diff line change
1
+ server {
2
+ listen 80;
3
+ server_name localhost;
4
+
5
+ #access_log /var/log/nginx/host.access.log main;
6
+
7
+ location / {
8
+ root /usr/share/nginx/html;
9
+ index index.html index.htm;
10
+ }
11
+
12
+ #error_page 404 /404.html;
13
+
14
+ # redirect server error pages to the static page /50x.html
15
+ #
16
+ error_page 500 502 503 504 /50x.html;
17
+ error_page 404 =200 /index.html;
18
+ location = /50x.html {
19
+ root /usr/share/nginx/html;
20
+ }
21
+
22
+ # proxy the PHP scripts to Apache listening on 127.0.0.1:80
23
+ #
24
+ #location ~ \.php$ {
25
+ # proxy_pass http://127.0.0.1;
26
+ #}
27
+
28
+ # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
29
+ #
30
+ #location ~ \.php$ {
31
+ # root html;
32
+ # fastcgi_pass 127.0.0.1:9000;
33
+ # fastcgi_index index.php;
34
+ # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
35
+ # include fastcgi_params;
36
+ #}
37
+
38
+ # deny access to .htaccess files, if Apache's document root
39
+ # concurs with nginx's one
40
+ #
41
+ #location ~ /\.ht {
42
+ # deny all;
43
+ #}
44
+ }
Original file line number Diff line number Diff line change @@ -4,43 +4,7 @@ services:
4
4
build : .
5
5
ports :
6
6
- " 80:80"
7
- links :
8
- - epochtalk
9
- environment :
10
- BASE_URL : " http://localhost:8080"
11
- epochtalk :
12
- image : quay.io/epochtalk/epochtalk:ui-refactor-2020
13
- ports :
14
- - " 8080:8080"
15
- - " 23958:23958"
16
- depends_on :
17
- - redis
18
- - postgres
19
- - epoch
20
- links :
21
- - redis
22
- - postgres
23
7
env_file :
24
- - epochtalk-docker.env
25
- epoch :
26
- image : quay.io/epochtalk/epoch:v1.14.0
27
- depends_on :
28
- - postgres
29
- links :
30
- - postgres
31
- environment :
32
- MIX_ENV : prod
33
- DATABASE_USER : docker
34
- DATABASE_PASSWORD : docker
35
- DATABASE_NAME : epochtalk
36
- DATABASE_HOST : postgres
37
- redis :
38
- image : redis:4.0.1
39
- user : redis
40
- postgres :
41
- image : postgres:11.1
42
- environment :
43
- POSTGRES_USER : docker
44
- POSTGRES_PASSWORD : docker
8
+ - epochtalk-vue.env
45
9
volumes :
46
- - ./db:/var/lib/postgresql/data
10
+ - ./data/nginx-vue/conf.d:/etc/nginx/conf.d
Original file line number Diff line number Diff line change
1
+ # When adding a new env variable,
2
+ # make sure to add an entry to:
3
+ # src/config.json (dev)
4
+ # and
5
+ # src/docker-config.json (prod)
1
6
VUE_APP_BACKEND_URL = http://localhost:4000
2
7
VUE_APP_OLD_BACKEND_URL = http://localhost:8080
3
8
VUE_APP_API_KEY = ABC123
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export const $axios2 = axios.create({
18
18
const $auth = localStorageCache ( 0 , 'app' ) . get ( 'auth' )
19
19
const initUser = $auth ? $auth . data : undefined
20
20
if ( initUser ) { $axios2 . defaults . headers . common [ 'Authorization' ] = `BEARER ${ initUser . token } ` }
21
- $axios2 . defaults . headers . common [ 'api-key' ] = 'NB/zpr4xwTT0icF84pp8E0Tu5T+bc+gGkZ6twZT+XGEU3TkX+S7cTJ6GckLJEztx'
21
+ $axios2 . defaults . headers . common [ 'api-key' ] = process . env . VUE_APP_API_KEY || config . VUE_APP_API_KEY
22
22
23
23
/* provided methods */
24
24
const $http = ( path , opts , handleErrors ) => {
Original file line number Diff line number Diff line change 1
1
{
2
2
"VUE_APP_OLD_BACKEND_URL" : " http://localhost:8080" ,
3
- "VUE_APP_BACKEND_URL" : " http://localhost:4000"
3
+ "VUE_APP_BACKEND_URL" : " http://localhost:4000" ,
4
+ "VUE_APP_API_KEY" : " 1234"
4
5
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"VUE_APP_OLD_BACKEND_URL" : " $VUE_APP_OLD_BACKEND_URL" ,
3
- "VUE_APP_BACKEND_URL" : " $VUE_APP_BACKEND_URL"
3
+ "VUE_APP_BACKEND_URL" : " $VUE_APP_BACKEND_URL" ,
4
+ "VUE_APP_API_KEY" : " $VUE_APP_API_KEY"
4
5
}
You can’t perform that action at this time.
0 commit comments