Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blog.limos.fr
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vincent MAZENOD
blog.limos.fr
Commits
b44688f2
Commit
b44688f2
authored
2 years ago
by
Vincent Mazenod
Browse files
Options
Downloads
Patches
Plain Diff
fixup! fix ci
parent
05be26aa
No related branches found
No related tags found
No related merge requests found
Pipeline
#9291
skipped
Stage: build
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.docker/build/pelican/Dockerfile
+54
-0
54 additions, 0 deletions
.docker/build/pelican/Dockerfile
.env
+3
-0
3 additions, 0 deletions
.env
Makefile
+69
-0
69 additions, 0 deletions
Makefile
docker-compose.yml
+16
-0
16 additions, 0 deletions
docker-compose.yml
with
142 additions
and
0 deletions
.docker/build/pelican/Dockerfile
0 → 100644
+
54
−
0
View file @
b44688f2
# FROM nikolaik/python-nodejs:python3.7-nodejs16-bullseye AS compile-image
FROM
nikolaik/python-nodejs:python3.7-nodejs16-bullseye
AS
source-image
ARG
DEBIAN_FRONTEND=noninteractive
RUN
{
\
echo
krb5-config krb5-config/default_realm string
'LOCAL.ISIMA.FR'
;
\
echo
tzdata tzdata/Areas string
'Etc'
;
\
echo
tzdata tzdata/Zones/Etc string
'UTC'
;
\
}
| debconf-set-selections
\
&&
\
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
build-essential
\
gcc
\
apt-utils
\
krb5-user
\
krb5-config
\
locales
\
rsync
\
&&
\
locale-gen fr_FR
\
locale-gen fr_FR.UTF-8
\
update-locale
LANG
=
fr_FR.UTF-8
\
.
/etc/default/locale
COPY
requirements.txt .
RUN
pip
install
--user
-r
requirements.txt
COPY
content/package.json ./content/package.json
RUN
cd
content
&&
yarn
install
# FROM nikolaik/python-nodejs:python3.7-nodejs16-bullseye AS build-image
# COPY --from=compile-image /root/.local /root/.local
# COPY --from=compile-image /usr/bin /usr/bin
# COPY --from=compile-image /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
# LABEL stage=builder
ENV
SRV_DIR=//srv
ENV
WORKING_DIR=//srv/pelican
ENV
PORT=8000
ENV
PATH=/root/.local/bin:$PATH
ADD
. $SRV_DIR
WORKDIR
$WORKING_DIR
RUN
mkdir
output content cache
VOLUME
["$WORKING_DIR/"]
# make python server in foreground
RUN
sed
-i
's/\$port &/\$port/g'
$SRV_DIR
/develop_server.sh
RUN
chmod
+x
$SRV_DIR
/develop_server.sh
EXPOSE
$PORT
ENTRYPOINT
$SRV_DIR/develop_server.sh start $PORT
This diff is collapsed.
Click to expand it.
.env
0 → 100644
+
3
−
0
View file @
b44688f2
REGISTRY_URL=docker.isima.fr
NAMESPACE=docker.isima.fr/vimazeno
APP_NAME=pelican_perso
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Makefile
0 → 100644
+
69
−
0
View file @
b44688f2
BOLD
:=
\0
33[1m
RESET
:=
\0
33[0m
RED
:=
\0
33[31m
GREEN
:=
\0
33[32m
YELLOW
:=
\0
33[33m
BLUE
:=
\0
33[34m
MAGENTA
:=
\0
33[35m
SHELL
:=
/bin/bash
IMAGES
:=
$(
shell docker-compose config
--services
)
TAG
:=
$(
shell git rev-parse
--short
HEAD
)
VOLUMES
:=
content/node_modules output
# Executables (local)
DOCKER_COMP
:=
docker-compose
.DEFAULT_GOAL
:=
help
# Docker containers
PELICAN_CONT
:=
$(
DOCKER_COMP
)
exec
pelican
include
.env
build
:
##
Build required docker compose images
@$(
DOCKER_COMP
)
build
@
docker image prune
-f
--filter
label
=
stage
=
source-image
@
docker image prune
-f
--filter
label
=
stage
=
build-image
.PHONY
:
build
push
:
##
Push build docker compose images
@
docker login
${
REGISTRY_URL
}
@
docker push
${
NAMESPACE
}
/
${
APP_NAME
}
:latest
@
docker image tag
${
NAMESPACE
}
/
${
APP_NAME
}
:latest
${
NAMESPACE
}
/
${
APP_NAME
}
:
${
TAG
}
@
docker push
${
NAMESPACE
}
/
${
APP_NAME
}
:
${
TAG
}
;
.PHONY
:
push
up
:
##
Make required containers up
@$(
DOCKER_COMP
)
up
--remove-orphans
.PHONY
:
up
down
:
##
Make required containers down
@$(
DOCKER_COMP
)
down
.PHONY
:
down
logs
:
##
Show live containers logs. Pass the parameter "c=" to see one specific container's logs
,
example: make logs c='frontend'
@$(
eval
c ?
=
)
@
if
[
-z
"
$(
c
)
"
]
;
then
\
$(
DOCKER_COMP
)
logs
--follow
;
\
else
\
$(
DOCKER_COMP
)
logs
--timestamps
--follow
$(
c
);
\
fi
.PHONY
:
logs
errors
:
##
Show live container errors.
@$(
DOCKER_COMP
)
logs |
grep
error
.PHONY
:
errors
pelican
:
##
Open bash on php container
@$(
PELICAN_CONT
)
bash
.PHONY
:
pelican
clean
:
##
Remove node and php folders and files
@
for
volume
in
${
VOLUMES
}
;
do
\
sudo rm
-rf
$${
volume
}
;
\
done
.PHONY
:
clean
help
:
@
grep
-h
-E
'^[a-zA-Z_-]+:.*?## .*$$'
$(
MAKEFILE_LIST
)
|
awk
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY
:
help
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
16
−
0
View file @
b44688f2
version
:
'
3.5'
services
:
pelican
:
image
:
${NAMESPACE}/${APP_NAME}:latest
build
:
context
:
.
dockerfile
:
.docker/build/pelican/Dockerfile
container_name
:
pelican
environment
:
TZ
:
${TIMEZONE:-Europe/Paris}
volumes
:
-
.:/srv/pelican
ports
:
-
"
8000:8000"
\ No newline at end of file
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