Add docker deployment
All checks were successful
build docker image / docker-build (push) Successful in 4m53s

This commit is contained in:
Illya Marchenko 2024-11-04 16:55:31 +02:00
parent 05ee3106a4
commit a07120a962
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F
9 changed files with 7 additions and 25 deletions

@ -82,14 +82,11 @@ COPY . .
RUN npm install \
&& npm run build \
&& chown www-data:www-data . -R \
&& mv /tmp/dist/* /tmp/api /var/www/html
WORKDIR /var/www/html
RUN cp config.js.ci config.js \
&& sed -i "s/{APP_URL}/$APP_URL/g" config.js \
&& chown www-data:www-data . -R
COPY ./entrypoint.sh /
CMD ["/bin/bash", "/entrypoint.sh"]

@ -1,5 +0,0 @@
const config = {
APP_URL: '{APP_URL}',
};
export { config };

@ -1,5 +0,0 @@
const config = {
APP_URL: 'http://192.168.33.27:3000/',
};
export { config };

@ -1,6 +1,6 @@
{
"name": "yourmap-tracker",
"version": "0.0.0",
"name": "random-web-tools",
"version": "1.0.0",
"scripts": {
"build": "vite build",
"lint": "eslint .. --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",

@ -4,7 +4,6 @@
<script>
import axios from "axios";
import { config } from "../../config";
export default {
data() {
@ -13,7 +12,7 @@ export default {
};
},
mounted() {
axios.post(`${config.APP_URL}/api/php/phpinfo.php`, {}).then((response) => {
axios.post(`/api/php/phpinfo.php`, {}).then((response) => {
const phpinfoHTML = response.data;
// Create a temporary DOM element

@ -34,7 +34,6 @@
<script>
import axios from "axios";
import { config } from "../../../config";
import MonacoEditor from "@/components/MonacoEditor.vue";
export default {
@ -53,7 +52,7 @@ export default {
methods: {
result() {
axios
.post(`${config.APP_URL}/api/php/php_array_to_json.php`, {
.post(`/api/php/php_array_to_json.php`, {
data: this.toolData.data,
minify_json: !!this.toolData.minifyJson,
})

@ -46,7 +46,6 @@
<script>
import axios from "axios";
import { config } from "../../../config";
import MonacoEditor from "@/components/MonacoEditor.vue";
export default {
@ -65,7 +64,7 @@ export default {
methods: {
result() {
axios
.post(`${config.APP_URL}/api/php/php_serialize.php`, {
.post(`/api/php/php_serialize.php`, {
data: this.toolData.data,
mode: this.toolData.mode,
})

@ -44,7 +44,6 @@
<script>
import axios from "axios";
import { config } from "../../../config";
import MonacoEditor from "@/components/MonacoEditor.vue";
export default {
@ -64,7 +63,7 @@ export default {
methods: {
result() {
axios
.post(`${config.APP_URL}/api/php/str_to_php_array.php`, {
.post(`/api/php/str_to_php_array.php`, {
data: this.toolData.data,
delimiter: this.toolData.dataDelimiter,
mode: this.toolData.dataIsJson ? "json" : null,

@ -21,7 +21,6 @@
<script>
import axios from "axios";
import { config } from "../../../config";
import MonacoEditor from "@/components/MonacoEditor.vue";
export default {