Cleanup Gitlab CI and Dockerfiles

environments/review-docs-devel-1399dq/deployments/12466
JuniorJPDJ 2022-07-10 19:31:37 +02:00 zatwierdzone przez Georg Krause
rodzic 622369c62b
commit 96c2eacb0f
8 zmienionych plików z 29 dodań i 40 usunięć

Wyświetl plik

@ -25,7 +25,7 @@ stages:
review_front:
interruptible: true
stage: review
image: node:16-buster
image: node:16-alpine
when: manual
allow_failure: true
variables:
@ -34,8 +34,7 @@ review_front:
VUE_APP_INSTANCE_URL: $REVIEW_INSTANCE_URL
NODE_ENV: review
before_script:
- curl -L -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
- chmod +x /usr/local/bin/jq
- apk add --no-cache jq bash coreutils python3
- rm -rf front-review
- mkdir front-review
- cd front
@ -118,7 +117,7 @@ changelog_snippet:
black:
interruptible: true
image: python:3.6
image: python:3.10
stage: lint
variables:
GIT_STRATEGY: fetch
@ -129,7 +128,7 @@ black:
flake8:
interruptible: true
image: python:3.6
image: python:3.7
stage: lint
variables:
GIT_STRATEGY: fetch
@ -144,10 +143,11 @@ flake8:
eslint:
interruptible: true
image: node:16-buster
image: node:16-alpine
stage: lint
before_script:
- cd front
- apk add --no-cache jq bash coreutils python3
- yarn install
script:
- yarn lint --max-warnings 0
@ -159,8 +159,8 @@ eslint:
test_api:
interruptible: true
services:
- postgres:14
- redis:6
- postgres:14-alpine
- redis:7-alpine
stage: test
retry: 1
cache:
@ -199,9 +199,10 @@ test_api:
test_front:
interruptible: true
stage: test
image: node:16-buster
image: node:16-alpine
before_script:
- cd front
- apk add --no-cache jq bash coreutils python3
only:
refs:
- branches
@ -226,8 +227,8 @@ build_docs:
stage: build
image: $CI_REGISTRY/funkwhale/backend-test-docker:3.10
services:
- postgres:14
- redis:6
- postgres:14-alpine
- redis:7-alpine
cache:
key: "$CI_PROJECT_ID__pip_cache"
paths:
@ -254,10 +255,9 @@ build_docs:
build_front:
stage: build
image: node:16-buster
image: node:16-alpine
before_script:
- curl -L -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
- chmod +x /usr/local/bin/jq
- apk add --no-cache jq bash coreutils python3
- cd front
script:
- yarn install

Wyświetl plik

@ -67,3 +67,4 @@ mailhog
*.sqlite3
music
media
data

Wyświetl plik

@ -40,8 +40,8 @@ RUN python -m venv --system-site-packages /venv
# emulate activation by prefixing PATH
ENV PATH="/venv/bin:/root/.local/bin:$PATH" VIRTUAL_ENV=/venv
COPY --from=0 /requirements.txt /requirements.txt
COPY --from=0 /dev-requirements.txt /dev-requirements.txt
COPY --from=pre-build /requirements.txt /requirements.txt
COPY --from=pre-build /dev-requirements.txt /dev-requirements.txt
# hack around https://github.com/pypa/pip/issues/6158#issuecomment-456619072
ENV PIP_DOWNLOAD_CACHE=/noop/
RUN \

Wyświetl plik

@ -0,0 +1 @@
Cleanup Gitlab CI and Dockerfiles (!1796)

Wyświetl plik

@ -3,29 +3,23 @@ version: "3"
services:
postgres:
restart: unless-stopped
networks:
- default
env_file: .env
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
image: postgres:14
image: postgres:14-alpine
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
restart: unless-stopped
networks:
- default
env_file: .env
image: redis:6
image: redis:7-alpine
volumes:
- ./data/redis:/data
celeryworker:
restart: unless-stopped
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
networks:
- default
depends_on:
- postgres
- redis
@ -48,8 +42,6 @@ services:
celerybeat:
restart: unless-stopped
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
networks:
- default
depends_on:
- postgres
- redis
@ -59,8 +51,6 @@ services:
api:
restart: unless-stopped
image: funkwhale/api:${FUNKWHALE_VERSION:-latest}
networks:
- default
depends_on:
- postgres
- redis
@ -75,8 +65,6 @@ services:
front:
restart: unless-stopped
image: funkwhale/front:${FUNKWHALE_VERSION:-latest}
networks:
- default
depends_on:
- api
env_file:
@ -97,6 +85,3 @@ services:
ports:
# override those variables in your .env file if needed
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80"
networks:
default:

Wyświetl plik

@ -25,7 +25,7 @@ services:
env_file:
- .env.dev
- .env
image: postgres:${POSTGRES_VERSION-11}
image: postgres:${POSTGRES_VERSION-11}-alpine
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
command: postgres ${POSTGRES_ARGS-}
@ -38,7 +38,7 @@ services:
env_file:
- .env.dev
- .env
image: redis:5
image: redis:7-alpine
volumes:
- "./data/${COMPOSE_PROJECT_NAME-node1}/redis:/data"
networks:
@ -48,11 +48,12 @@ services:
env_file:
- .env.dev
- .env
build: &backend
build:
context: ./api
dockerfile: Dockerfile
args:
install_dev_deps: 1
image: funkwhale-api
entrypoint: compose/django/dev-entrypoint.sh
command: >
bash -c "python manage.py collectstatic --no-input
@ -91,7 +92,7 @@ services:
env_file:
- .env.dev
- .env
build: *backend
image: funkwhale-api
depends_on:
- postgres
# - minio

Wyświetl plik

@ -1,4 +1,4 @@
FROM node:16 as builder
FROM node:16-alpine as builder
WORKDIR /app
COPY package.json yarn.lock /app/
@ -7,6 +7,7 @@ COPY scripts /app/scripts
COPY public /app/public
COPY vite.config.js index.html embed.html /app/
RUN apk add --no-cache jq bash coreutils python3
RUN yarn install
RUN yarn build:deployment

Wyświetl plik

@ -1,7 +1,7 @@
FROM node:16-buster
FROM node:16-alpine
# needed to compile translations
RUN apt-get update && apt-get install -y jq
RUN apk add --no-cache jq bash coreutils python3
EXPOSE 8080
WORKDIR /app/