├── .env ├── .gitignore ├── README.md ├── api.dockerfile ├── api ├── .realize.yaml ├── app ├── go.mod ├── go.sum └── main.go ├── architect-vue-go-postgres-nginx.jpg ├── db.dockerfile ├── docker-compose.yml ├── proxy.dockerfile ├── proxy └── default-dev.conf ├── web.dockerfile └── web ├── .gitignore ├── README.md ├── babel.config.js ├── entry-point.sh ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ └── HelloWorld.vue └── main.js └── vue.config.js /.env: -------------------------------------------------------------------------------- 1 | WEB_PORT=8080 2 | API_PORT=8081 3 | PROXY_PORT=80 4 | POSTGRES_PORT=5432 5 | POSTGRES_DB=test 6 | POSTGRES_USER=test 7 | POSTGRES_PASSWORD=test 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | .DS_Store 4 | app/dist 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue + Go + Postgres + Nginx on docker 2 | 3 | This is the dev-environment for Vue.js, Go, Postgres and Nginx on docker. 4 | 5 | This is using the following technologies: 6 | 7 | - Environments 8 | - node:8.16-alpine 9 | - golang:1.13-alpine 10 | - postgres:12-alpine 11 | - nginx:1.17-alpine 12 | - Node.js 13 | - Vue CLI 14 | - Vuex 15 | - Vue Router 16 | - Go 17 | - realize 18 | 19 | ## Requirements 20 | 21 | The app requires the following to run: 22 | 23 | - Docker 24 | - Docker Compose 25 | 26 | ## Getting Started 27 | 28 | To use the environment, clone the repo and execute `docker-compose up`. 29 | 30 | ``` 31 | docker-compose up -d 32 | ``` 33 | 34 | After launching containers, access the `localhost:80`. 35 | 36 | Nginx acts as a reverse proxy, passing to Vue or Go containers. 37 | 38 | ![proxy-image](./architect-vue-go-postgres-nginx.jpg "proxy image") 39 | 40 | 41 | Thank you. 42 | 43 | ## Author 44 | 45 | [Hoda](https://hodalog.com) 46 | 47 | -------------------------------------------------------------------------------- /api.dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.13-alpine 2 | ENV LANG='ja_JP.utf8' 3 | ENV GO111MODULE='on' 4 | 5 | ARG POSTGRES_DB 6 | ARG POSTGRES_USER 7 | ARG POSTGRES_PASSWORD 8 | ARG POSTGRES_PORT 9 | ENV POSTGRES_DB $POSTGRES_DB 10 | ENV POSTGRES_USER $POSTGRES_USER 11 | ENV POSTGRES_PASSWORD $POSTGRES_PASSWORD 12 | ENV POSTGRES_PORT $POSTGRES_PORT 13 | 14 | WORKDIR /go/app 15 | COPY ./api /go/app 16 | 17 | RUN apk --no-cache update \ 18 | && apk add --no-cache git tzdata \ 19 | && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \ 20 | && apk del tzdata \ 21 | && rm -rf /var/cache/apk/* \ 22 | && go get gopkg.in/urfave/cli.v2@master \ 23 | && go get github.com/oxequa/realize 24 | 25 | CMD realize start 26 | -------------------------------------------------------------------------------- /api/.realize.yaml: -------------------------------------------------------------------------------- 1 | settings: 2 | legacy: 3 | force: false 4 | interval: 0s 5 | schema: 6 | - name: app 7 | path: . 8 | commands: 9 | install: 10 | status: true 11 | method: go build -o app 12 | run: 13 | status: true 14 | method: ./app 15 | watcher: 16 | extensions: 17 | - go 18 | paths: 19 | - / 20 | ignore: 21 | paths: 22 | - .git 23 | - .realize 24 | - vendor 25 | -------------------------------------------------------------------------------- /api/app: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hodanov/docker-template-vue-go-postgres-nginx/f946ee931dd72526505d20ad5f1f185ea78ca95b/api/app -------------------------------------------------------------------------------- /api/go.mod: -------------------------------------------------------------------------------- 1 | module app 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect 7 | github.com/fatih/color v1.7.0 // indirect 8 | github.com/fsnotify/fsnotify v1.4.7 // indirect 9 | github.com/go-siris/siris v7.4.0+incompatible // indirect 10 | github.com/labstack/echo v3.3.10+incompatible // indirect 11 | github.com/labstack/gommon v0.3.0 // indirect 12 | github.com/mattn/go-colorable v0.1.4 // indirect 13 | github.com/mattn/go-isatty v0.0.10 // indirect 14 | github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7 // indirect 15 | github.com/oxequa/realize v2.0.2+incompatible // indirect 16 | github.com/satori/go.uuid v1.2.0 // indirect 17 | github.com/sirupsen/logrus v1.4.2 // indirect 18 | github.com/valyala/fasttemplate v1.1.0 // indirect 19 | golang.org/x/net v0.0.0-20191011234655-491137f69257 // indirect 20 | gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717 // indirect 21 | gopkg.in/yaml.v2 v2.2.4 // indirect 22 | ) 23 | -------------------------------------------------------------------------------- /api/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 2 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= 4 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 5 | github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= 6 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 7 | github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= 8 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 9 | github.com/go-siris/siris v7.4.0+incompatible h1:dZb+3EeuhRveTeeQ9sLXVbLMeadiQme32/JaCtZKrqo= 10 | github.com/go-siris/siris v7.4.0+incompatible/go.mod h1:bw/JZxpCF3U5eUlNOjsAzCFbIzRRly9Aa+jvvlO4UKI= 11 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= 12 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 13 | github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg= 14 | github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= 15 | github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= 16 | github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= 17 | github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 18 | github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= 19 | github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= 20 | github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 21 | github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= 22 | github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= 23 | github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= 24 | github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7 h1:VhMyYEArWL80OqmBloufn/ABe355btZ3Md+EFFrv+zE= 25 | github.com/oxequa/interact v0.0.0-20171114182912-f8fb5795b5d7/go.mod h1:lYzYp3DJ1SPLrp8ZX8ODprgEoxmNelVN+TKaWvum0cg= 26 | github.com/oxequa/realize v2.0.2+incompatible h1:R+Rg8R+gyuWP8oqvFpaJMzdcFF0vy15zjEAGAiuc8pQ= 27 | github.com/oxequa/realize v2.0.2+incompatible/go.mod h1:Bqw5jC78Eh70s7/rryEaVPwps/kYdPxBWTZDE+6x0/8= 28 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 29 | github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= 30 | github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= 31 | github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= 32 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 33 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 34 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 35 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 36 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 37 | github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= 38 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= 39 | github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= 40 | github.com/valyala/fasttemplate v1.1.0 h1:RZqt0yGBsps8NGvLSGW804QQqCUYYLsaOjTVHy1Ocw4= 41 | github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= 42 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= 43 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 44 | golang.org/x/net v0.0.0-20191011234655-491137f69257 h1:ry8e2D+cwaV6hk7lb3aRTjjZo24shrbK0e11QEOkTIg= 45 | golang.org/x/net v0.0.0-20191011234655-491137f69257/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 46 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 47 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 48 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= 49 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 50 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 51 | golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU= 52 | golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 53 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 54 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 55 | gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717 h1:OvXt/p4cdwNl+mwcWMq/AxaKFkhdxcjx+tx+qf4EOvY= 56 | gopkg.in/urfave/cli.v2 v2.0.0-20190806201727-b62605953717/go.mod h1:cKXr3E0k4aosgycml1b5z33BVV6hai1Kh7uDgFOkbcs= 57 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 58 | gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= 59 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 60 | -------------------------------------------------------------------------------- /api/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | ) 7 | 8 | func hello(w http.ResponseWriter, r *http.Request) { 9 | fmt.Fprintf(w, "Hello, you've requested: %s\n", r.URL.Path) 10 | } 11 | 12 | func handleRequests() { 13 | http.HandleFunc("/api/hello/", hello) 14 | http.ListenAndServe(":8081", nil) 15 | } 16 | 17 | func main() { 18 | handleRequests() 19 | } 20 | -------------------------------------------------------------------------------- /architect-vue-go-postgres-nginx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hodanov/docker-template-vue-go-postgres-nginx/f946ee931dd72526505d20ad5f1f185ea78ca95b/architect-vue-go-postgres-nginx.jpg -------------------------------------------------------------------------------- /db.dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:12-alpine 2 | ENV LANG ja_JP.utf8 3 | 4 | ARG POSTGRES_DB 5 | ARG POSTGRES_USER 6 | ARG POSTGRES_PASSWORD 7 | ENV POSTGRES_DB $POSTGRES_DB 8 | ENV POSTGRES_USER $POSTGRES_USER 9 | ENV POSTGRES_PASSWORD $POSTGRES_PASSWORD 10 | 11 | WORKDIR /docker-entrypoint-initdb.d 12 | 13 | RUN apk --no-cache update \ 14 | && cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime 15 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | web: 5 | container_name: web 6 | build: 7 | context: . 8 | dockerfile: web.dockerfile 9 | depends_on: 10 | - api 11 | tty: true 12 | volumes: 13 | - ./web:/app 14 | 15 | api: 16 | container_name: api 17 | build: 18 | context: . 19 | dockerfile: api.dockerfile 20 | args: 21 | - POSTGRES_DB=$POSTGRES_DB 22 | - POSTGRES_USER=$POSTGRES_USER 23 | - POSTGRES_PASSWORD=$POSTGRES_PASSWORD 24 | - POSTGRES_PORT=$POSTGRES_PORT 25 | depends_on: 26 | - db 27 | tty: true 28 | volumes: 29 | - ./api:/go/app 30 | 31 | db: 32 | container_name: db 33 | build: 34 | context: . 35 | dockerfile: db.dockerfile 36 | args: 37 | - POSTGRES_DB=$POSTGRES_DB 38 | - POSTGRES_USER=$POSTGRES_USER 39 | - POSTGRES_PASSWORD=$POSTGRES_PASSWORD 40 | volumes: 41 | - ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d 42 | 43 | proxy: 44 | container_name: proxy 45 | build: 46 | context: . 47 | dockerfile: proxy.dockerfile 48 | ports: 49 | - $PROXY_PORT:$PROXY_PORT 50 | depends_on: 51 | - web 52 | volumes: 53 | - ./proxy:/app 54 | -------------------------------------------------------------------------------- /proxy.dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:1.17-alpine 2 | COPY ./proxy/default-dev.conf /etc/nginx/conf.d/default.conf 3 | # COPY ./proxy/default-prd.conf /etc/nginx/conf.d/default.conf 4 | -------------------------------------------------------------------------------- /proxy/default-dev.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | location / { 6 | proxy_http_version 1.1; 7 | proxy_set_header Upgrade $http_upgrade; 8 | proxy_set_header Connection "upgrade"; 9 | proxy_set_header Host $host; 10 | proxy_pass http://web:8080; 11 | } 12 | 13 | location /api/ { 14 | proxy_http_version 1.1; 15 | proxy_set_header Upgrade $http_upgrade; 16 | proxy_set_header Connection "upgrade"; 17 | proxy_set_header Host $host; 18 | proxy_pass http://api:8081; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /web.dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.16-alpine 2 | 3 | WORKDIR /app 4 | COPY ./web /app 5 | 6 | RUN apk --no-cache update \ 7 | && apk add curl 8 | 9 | # CMD sh ./entry-point.sh 10 | -------------------------------------------------------------------------------- /web/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /web/README.md: -------------------------------------------------------------------------------- 1 | # app 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /web/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /web/entry-point.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | npm install 3 | npm run serve 4 | -------------------------------------------------------------------------------- /web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^2.6.5", 12 | "vue": "^2.6.10", 13 | "vue-router": "^3.1.3", 14 | "vuex": "^3.1.1" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "^3.12.0", 18 | "@vue/cli-plugin-eslint": "^3.12.0", 19 | "@vue/cli-service": "^3.12.0", 20 | "babel-eslint": "^10.0.1", 21 | "eslint": "^5.16.0", 22 | "eslint-plugin-vue": "^5.0.0", 23 | "vue-template-compiler": "^2.6.10" 24 | }, 25 | "eslintConfig": { 26 | "root": true, 27 | "env": { 28 | "node": true 29 | }, 30 | "extends": [ 31 | "plugin:vue/essential", 32 | "eslint:recommended" 33 | ], 34 | "rules": {}, 35 | "parserOptions": { 36 | "parser": "babel-eslint" 37 | } 38 | }, 39 | "postcss": { 40 | "plugins": { 41 | "autoprefixer": {} 42 | } 43 | }, 44 | "browserslist": [ 45 | "> 1%", 46 | "last 2 versions" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hodanov/docker-template-vue-go-postgres-nginx/f946ee931dd72526505d20ad5f1f185ea78ca95b/web/public/favicon.ico -------------------------------------------------------------------------------- /web/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | app 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /web/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 29 | -------------------------------------------------------------------------------- /web/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hodanov/docker-template-vue-go-postgres-nginx/f946ee931dd72526505d20ad5f1f185ea78ca95b/web/src/assets/logo.png -------------------------------------------------------------------------------- /web/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 41 | 42 | 43 | 59 | -------------------------------------------------------------------------------- /web/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App), 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /web/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicPath: './', 3 | devServer: { 4 | host: '0.0.0.0', 5 | watchOptions: { 6 | poll: 300 7 | } 8 | }, 9 | runtimeCompiler: true 10 | } 11 | --------------------------------------------------------------------------------