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 \ RUN npm install \
&& npm run build \ && npm run build \
&& chown www-data:www-data . -R \
&& mv /tmp/dist/* /tmp/api /var/www/html && mv /tmp/dist/* /tmp/api /var/www/html
WORKDIR /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 / COPY ./entrypoint.sh /
CMD ["/bin/bash", "/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", "name": "random-web-tools",
"version": "0.0.0", "version": "1.0.0",
"scripts": { "scripts": {
"build": "vite build", "build": "vite build",
"lint": "eslint .. --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore", "lint": "eslint .. --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore",

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

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

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

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

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