Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rexruan committed Mar 18, 2024
1 parent 87d3ccd commit f316ee7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
MYSQL_USER: swegram
MYSQL_PASSWORD: swegram_pass
MYSQL_HOST: 172.18.0.1
PRODUCTION: 1
ports:
- "8000:8000"
entrypoint: >
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Common/TextSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export default {
localStorage.setItem('metadata', JSON.stringify({ en: {}, sv: {} }));
}
axios
.put(`/api/texts/${this.$route.params.toolVersion}`, {
.put(`/api/texts/${lang}`, {
texts: JSON.parse(localStorage.textList)[lang],
metadata: JSON.parse(localStorage.metadata)[lang],
})
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ axios.defaults.xsrfCookieName = 'csrftoken';

const router = new VueRouter({
routes: [
{ path: '/', redirect: '/en'},
{
path: '/',
redirect: '/en',
},
{
path: '/:toolVersion(en|sv)',
component: MainPage,
Expand Down
9 changes: 4 additions & 5 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash -e

#clean up possible old containers
docker compose --profile client down

BASE_PATH=$(pwd)
FRONTEND_PATH="$BASE_PATH/frontend"

Expand All @@ -10,10 +13,6 @@ docker build --network host -t vue-builder -f Dockerfile.build .
# run vue-builder image to create dist
docker run --rm -v $FRONTEND_PATH/dist:/root/dist vue-builder

# Create swegram-backend image
cd $BASE_PATH
docker build --network host -t swegram-backend .

# Start the containers with help of docker compose
# remove data (mysql container generates data folder)
docker compose --profile client up -d
docker compose --profile client up -d --build

0 comments on commit f316ee7

Please sign in to comment.