docker: set up a configuration for development

This commit is contained in:
herve0742 2023-01-23 13:01:24 +01:00 committed by bmartins
parent 481190f3bf
commit 5d77266d05
5 changed files with 26 additions and 4 deletions

View File

@ -11,3 +11,6 @@ trim_trailing_whitespace = true
[*.md] [*.md]
max_line_length = off max_line_length = off
trim_trailing_whitespace = false trim_trailing_whitespace = false
[*.yaml]
indent_style = space

13
compose.yaml Normal file
View File

@ -0,0 +1,13 @@
services:
date-front:
image: node:lts-slim
entrypoint:
- "bash"
- "docker/dev/entrypoint.sh"
volumes:
- '.:/var/www/html/funky-framadate-front'
working_dir: '/var/www/html/funky-framadate-front'
environment:
- "NODE_OPTIONS=--openssl-legacy-provider"
ports:
- "4200:4200"

2
docker/dev/entrypoint.sh Executable file
View File

@ -0,0 +1,2 @@
yarn install --pure-lockfile
yarn start_docker

View File

@ -8,6 +8,7 @@
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"start_docker": "ng serve --host 0.0.0.0",
"build:prod": "ng build --prod", "build:prod": "ng build --prod",
"build:prod:stats": "ng build --prod --stats-json", "build:prod:stats": "ng build --prod --stats-json",
"build:prod:gitlabpage": "ng build --prod --baseHref=/framadate/funky-framadate-front/", "build:prod:gitlabpage": "ng build --prod --baseHref=/framadate/funky-framadate-front/",
@ -130,5 +131,8 @@
"^.+\\.(ts|html)$": "ts-jest", "^.+\\.(ts|html)$": "ts-jest",
"^.+\\.jsx?$": "babel-jest" "^.+\\.jsx?$": "babel-jest"
} }
},
"browser": {
"crypto": false
} }
} }

View File

@ -4,13 +4,13 @@ export const backendApiUrlsInDev = {
local: 'http://localhost:8000/api/v1', // the docker port is this one local: 'http://localhost:8000/api/v1', // the docker port is this one
// local: 'http://www.tk.lan/index.php/api/v1', // local: 'http://www.tk.lan/index.php/api/v1',
// local: 'https://framadate-api.cipherbliss.com/api/v1', // local: 'https://framadate-api.cipherbliss.com/api/v1',
// remote: 'http://localhost:8000/api/v1', remote: 'http://localhost:8000/api/v1',
// remote: 'http://www.tk.lan/index.php/api/v1', // remote: 'http://www.tk.lan/index.php/api/v1',
remote: 'https://framadate-api.cipherbliss.com/api/v1', //remote: 'https://framadate-api.cipherbliss.com/api/v1',
}; };
export const apiV1 = { export const apiV1 = {
// baseHref: 'http://localhost:8000/api/v1', // local "symfony serve" live server baseHref: 'http://localhost:8000/api/v1', // local "symfony serve" live server
baseHref: 'http://www.tk.lan/index.php/api/v1', // local apache2 server // baseHref: 'http://www.tk.lan/index.php/api/v1', // local apache2 server
// baseHref: 'http://tktest.lan/api/v1', // baseHref: 'http://tktest.lan/api/v1',
// baseHref: 'https://framadate-api.cipherbliss.com/api/v1', // demo preprod // baseHref: 'https://framadate-api.cipherbliss.com/api/v1', // demo preprod
api_new_poll: '/poll/', api_new_poll: '/poll/',