Skip to content
Snippets Groups Projects
Commit 97bb6811 authored by Leonardo Alain Surdez's avatar Leonardo Alain Surdez
Browse files

Merge branch 'fix/dockerDev' into 'master'

Fixing the development environment

Closes #41, #42, and #43

See merge request !19
parents 21952dec f88efaa2
No related branches found
No related tags found
1 merge request!19Fixing the development environment
DC = docker compose
up: network
.PHONY: _up
_up: network
$(DC) up -d
.PHONY: stop
stop:
$(DC) down
start: install up
$(DC) exec api bash -c 'composer update && composer install'
.PHONY: start
start: _up
$(DC) exec api bash -c 'composer install'
$(DC) run --entrypoint=/bin/sh gest -c '/usr/local/bin/npm i --no-funding'
.PHONY: build
build:
$(DC) build
.PHONY: list
list:
$(DC) ps
restart: stop up
# We assume that we always restart from up-to-date dependencies
.PHONY: restart
restart: stop _up
install:
# $(DC) run gest 'npm i --no-funding'
.PHONY: update
update:
$(DC) exec api bash -c 'composer update'
$(DC) exec gest bash -c 'npm update'
.PHONY: network
network:
if [ -z "$$(docker network ls -q -f name=canap_network)" ]; then \
docker network create canap_network; \
......
......@@ -47,7 +47,6 @@ services:
DB_DATABASE: canap_db
DB_USERNAME: canap_db
DB_PASSWORD: canap_db
labels:
- traefik.enable=true
- traefik.http.routers.form.rule=Host(`localhost`)
......@@ -64,6 +63,11 @@ services:
volumes:
- ../API:/var/www/html/
environment:
FILESERVERPATH: "/var/www/html/data/candidatures/"
SCIPERDEVRESPONSABLE: "348165"
SCIPERSUPERUSER: "348165"
TEQUILA_REQUIRE_PARAMS: "group=apprentis-fsd"
JWT_SECRET: "CHANGEMEruPigh9cui2eighahd2luu0di"
DB_CONNECTION: mysql
DB_HOST: db # todo
DB_PORT: 3306 # todo
......@@ -86,7 +90,6 @@ services:
working_dir: /home/node/app
depends_on:
- api
environment:
API_LOCATION: "https://localhost/api"
LOGIN_REDIRECT: "https://localhost/api/auth/login"
......@@ -102,7 +105,7 @@ services:
- traefik.http.services.gest.loadbalancer.server.port=8080
command:
- "-c"
- env DEBUG=express:router npm run serve-docker
- /usr/local/bin/npm run serve-docker
networks:
- canap_network
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment