Skip to content

Commit

Permalink
Merge pull request #1 from hydroshare:discoverapi
Browse files Browse the repository at this point in the history
Discoverapi
  • Loading branch information
devincowan authored Oct 2, 2024
2 parents 7134d5d + 55ec386 commit f6a4a78
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist
node_modules
**/dist
**/node_modules
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_BUCKET_URL_PUBLIC_PATH=/
VUE_APP_HYDROSHARE_URL=https://beta.hydroshare.org
VUE_APP_HYDROSHARE_URL=http://localhost:8000
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: create env file
run: |
touch .env
echo VITE_APP_API_URL=${{ secrets.VUE_APP_BUCKET_URL_PUBLIC_PATH }} >> .env
echo VITE_APP_FULL_URL=${{ secrets.VUE_APP_HYDROSHARE_URL }} >> .env
echo VUE_APP_BUCKET_URL_PUBLIC_PATH=${{ secrets.VUE_APP_BUCKET_URL_PUBLIC_PATH }} >> .env
echo VUE_APP_HYDROSHARE_URL=${{ secrets.VUE_APP_HYDROSHARE_URL }} >> .env
cp .env ../.env
- name: Install dependencies
run: npm install
Expand Down
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM node:14.14.0 as node-build
# Build stage
FROM node:14.14.0 as build-stage

# Arg used by the node build for discovery app
# This is the path to the bucket where the static files are stored
# This should be the same as the STATIC_URL in the Django settings
ARG VUE_APP_BUCKET_URL_PUBLIC_PATH
ARG VUE_APP_HYDROSHARE_URL

ADD . /

WORKDIR /

RUN npm install && \
npm run build
npm run build

# Production stage
FROM nginx:alpine

COPY --from=build-stage /dist /dist
Empty file removed migrations/__init__.py
Empty file.
5 changes: 3 additions & 2 deletions src/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ export default {
this.typeFilter = [];
this.availabilityFilter = [];
}
const hydroshareUrl = process.env.VUE_APP_HYDROSHARE_URL;
axios.get(`${hydroshareUrl}/discoverapi/`, {
// const hydroshareUrl = process.env.VUE_APP_HYDROSHARE_URL;
// axios.get(`${hydroshareUrl}/discoverapi/`, {
axios.get('/discoverapi/', {
params: {
q: this.searchtext,
sort: this.sortingBy,
Expand Down

0 comments on commit f6a4a78

Please sign in to comment.