Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quiz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
web-et-numerique-internet
WordPress
sites
Jeu Inclusif
Quiz
Commits
3c4cf30e
Commit
3c4cf30e
authored
1 month ago
by
Matthieu Benoist
Browse files
Options
Downloads
Patches
Plain Diff
Adds dev environnment
parent
35f79c29
Branches
Branches containing commit
Tags
1.2.1
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.env.example
+4
-0
4 additions, 0 deletions
.env.example
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
Makefile
+46
-0
46 additions, 0 deletions
Makefile
docker-compose.yml
+22
-0
22 additions, 0 deletions
docker-compose.yml
with
73 additions
and
0 deletions
.env.example
0 → 100644
+
4
−
0
View file @
3c4cf30e
PROJECT_NAME=quiz
PROJECT_HOSTNAME=quiz.grandlyon.localhost
CERT_SIZE=1
This diff is collapsed.
Click to expand it.
.gitignore
+
1
−
0
View file @
3c4cf30e
...
@@ -31,6 +31,7 @@ yarn-error.log
...
@@ -31,6 +31,7 @@ yarn-error.log
# Miscellaneous
# Miscellaneous
/.angular/cache
/.angular/cache
/.env
.sass-cache/
.sass-cache/
/connect.lock
/connect.lock
/coverage
/coverage
...
...
This diff is collapsed.
Click to expand it.
Makefile
0 → 100644
+
46
−
0
View file @
3c4cf30e
ifneq
(,$(wildcard ./.env))
include
.env
endif
.PHONY
:
config
config
:
cp
.env.example .env
# Docker
up
:
docker-compose up
-d
down
:
docker-compose down
ps
:
docker-compose ps
rebuild
:
docker-compose down
--remove-orphans
docker-compose build
--no-cache
docker-compose up
-d
# Mkcert
define
config_toml
[[tls.certificates]]
certFile
=
"/certs/
${
PROJECT_HOSTNAME
}
+
${
CERT_SIZE
}
.pem"
keyFile
=
"/certs/
${
PROJECT_HOSTNAME
}
+
${
CERT_SIZE
}
-key.pem"
endef
export
config_toml
npm-install
:
docker compose run --rm node npm install
certs
:
mkdir
-p
${
HOME
}
/.dockerdev/traefik/certs
${
HOME
}
/.dockerdev/traefik/conf
mkcert
${
PROJECT_HOSTNAME
}
*
.
${
PROJECT_HOSTNAME
}
${
CERT_ALIASES
}
mv
*
.pem ~/.dockerdev/traefik/certs
@
echo
"
$$
config_toml"
>
~/.dockerdev/traefik/conf/
${
PROJECT_NAME
}
-certs
.toml
install
:
config certs up
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
22
−
0
View file @
3c4cf30e
services
:
node
:
image
:
trion/ng-cli:17.2.1
restart
:
unless-stopped
volumes
:
-
./:/app
working_dir
:
/app
command
:
ng serve --host 0.0.0.0 --port
4200
networks
:
-
webgateway
labels
:
-
"
traefik.enable=true"
-
"
traefik.http.routers.${PROJECT_NAME}-front.rule=Host(`${PROJECT_HOSTNAME}`)"
-
"
traefik.http.routers.${PROJECT_NAME}-front.tls=true"
-
"
traefik.http.routers.${PROJECT_NAME}-front.entrypoints=websecure"
-
"
traefik.http.services.${PROJECT_NAME}-front.loadbalancer.server.port=4200"
-
"
traefik.http.services.${PROJECT_NAME}-nginx.loadbalancer.server.port=8080"
networks
:
webgateway
:
external
:
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment