You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the GitHub search to find a similar question and didn't find it.
I searched in the documentation/README.
I already searched in Google "How to do X" and didn't find any information.
I already read and followed all the tutorial in the docs/README and didn't find an answer.
Commit to Help
I commit to help with one of those options 👆
Description
I am going to use this project template with Gitlab. Will post my implementation here, anybody else did this already or has some ideas? we could collect them here :-)
Tests
Add a test script to the scripts folder, this is from the "old" project template
scripts/test-gitlab-ci.sh
#! /usr/bin/env sh# Exit in case of errorset -e
DOMAIN=backend \
SMTP_HOST="" \
TRAEFIK_PUBLIC_NETWORK_IS_EXTERNAL=false \
INSTALL_DEV=true \
docker compose \
-f docker-compose.yml \
config > docker-stack.yml
docker compose -f docker-stack.yml build
docker compose -f docker-stack.yml down -v --remove-orphans # Remove possibly previous broken stacks left hanging after an error
docker compose -f docker-stack.yml up -d
docker compose -f docker-stack.yml exec -T backend bash /app/tests-start.sh "$@"
docker compose -f docker-stack.yml down -v --remove-orphans
In docker-compose.yml, we substitute the fixed value for networks:traefik-public:external with a variable TRAEFIK_PUBLIC_NETWORK_IS_EXTERNAL
networks:
traefik-public:
# Allow setting it to false for testingexternal: ${TRAEFIK_PUBLIC_NETWORK_IS_EXTERNAL-true}
In the test stage of the .gitlab-ci.yml we call the test script:
tests:
stage: testscript:
- sh ./scripts/test-gitlab-ci.shtags:
- test
We also have to modify a line the docker file backend/Dockerfile to make sure we have the contents of the scripts folder available in the container under /app/scripts
from
COPY ./scripts/ /app/
to
COPY ./scripts /app/scripts
Build
The build works out of the box, this is the build stage in my .gitlab-ci.yml
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Description
I am going to use this project template with Gitlab. Will post my implementation here, anybody else did this already or has some ideas? we could collect them here :-)
Tests
Add a test script to the scripts folder, this is from the "old" project template
scripts/test-gitlab-ci.sh
In
docker-compose.yml
, we substitute the fixed value fornetworks:traefik-public:external
with a variableTRAEFIK_PUBLIC_NETWORK_IS_EXTERNAL
In the test stage of the
.gitlab-ci.yml
we call the test script:We also have to modify a line the docker file
backend/Dockerfile
to make sure we have the contents of thescripts
folder available in the container under/app/scripts
from
to
Build
The build works out of the box, this is the build stage in my
.gitlab-ci.yml
Operating System
Linux
Operating System Details
Irrelevant
Python Version
3.10
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions