mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
use mariadb in another docker for ci test
This commit is contained in:
parent
d25574c22f
commit
4e0783fc8e
9
.github/workflows/test_deploy.yml
vendored
9
.github/workflows/test_deploy.yml
vendored
@ -31,10 +31,5 @@ jobs:
|
||||
- name: docker-compose mariadb
|
||||
run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb
|
||||
|
||||
- name: run install script, which will run start.sh
|
||||
run: |
|
||||
cd deployment/hetzner_cloud
|
||||
sudo ./install.sh ${{ github.ref_name }}
|
||||
|
||||
#- name: Deploy Bare Metal | Build image
|
||||
# run: docker build -f ./deployment/bare_metal/Dockerfile --build-arg BRANCH_NAME=${{ github.ref_name }} -t "gradido/deploy-bare-metal:local" .
|
||||
- name: Deploy Bare Metal | Build image
|
||||
run: docker build --network host -f ./deployment/bare_metal/Dockerfile --build-arg BRANCH_NAME=${{ github.ref_name }} -t "gradido/deploy-bare-metal:local" .
|
||||
|
||||
@ -68,20 +68,10 @@ RUN npm i -g yarn
|
||||
# Install pm2
|
||||
RUN npm i -g pm2 && pm2 startup
|
||||
|
||||
# create db user
|
||||
ENV DB_USER=gradido
|
||||
RUN DB_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c 32)
|
||||
ENV DB_PASSWORD=$DB_PASSWORD
|
||||
|
||||
RUN
|
||||
RUN service mariadb start && mysql <<EOFMYSQL
|
||||
CREATE USER IF NOT EXISTS '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASSWORD';
|
||||
GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'localhost';
|
||||
FLUSH PRIVILEGES;
|
||||
EOFMYSQL
|
||||
|
||||
WORKDIR /app/gradido
|
||||
# Configure database
|
||||
RUN DB_USER=gradido
|
||||
RUN DB_PASSWORD=
|
||||
RUN envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < database/.env.template > database/.env
|
||||
|
||||
# Configure backend
|
||||
@ -106,8 +96,6 @@ RUN envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < federation/.env.templat
|
||||
###########################################################################################
|
||||
FROM install as start
|
||||
|
||||
RUN /etc/init.d/mariadb start
|
||||
|
||||
WORKDIR /app/gradido/deployment/bare_metal
|
||||
|
||||
# mock sudo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user