Specify target, move envvars to file, improve mocking
This commit is contained in:
@@ -1,20 +1,23 @@
|
|||||||
TARGET?=unstable
|
TARGET?=oldstable # or stable, unstable
|
||||||
|
|
||||||
mock:
|
mock:
|
||||||
docker compose -f tests/mock/compose.yaml up -d
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml up --remove-orphans -d
|
||||||
|
|
||||||
unmock:
|
unmock:
|
||||||
docker compose -f tests/mock/compose.yaml down
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml down
|
||||||
|
|
||||||
client:
|
client:
|
||||||
docker compose -f tests/mock/compose.yaml rm -fs client
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml rm -fs client
|
||||||
docker compose -f tests/mock/compose.yaml up -d client
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml up --remove-orphans -d client
|
||||||
|
|
||||||
shell:
|
shell:
|
||||||
docker compose -f tests/mock/compose.yaml exec client bash
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml run --rm client bash
|
||||||
|
|
||||||
logs:
|
logs:
|
||||||
docker compose -f tests/mock/compose.yaml logs -f client
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml logs -f client
|
||||||
|
|
||||||
|
ps:
|
||||||
|
TARGET=${TARGET} docker compose -f tests/mock/compose.yaml ps
|
||||||
|
|
||||||
build:
|
build:
|
||||||
TARGET=${TARGET} CI_COMMIT_TAG=${CI_COMMIT_TAG} bash scripts/build-images.sh
|
TARGET=${TARGET} CI_COMMIT_TAG=${CI_COMMIT_TAG} bash scripts/build-images.sh
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ RUN apt-get update && \
|
|||||||
oathtool \
|
oathtool \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
gnupg \
|
gnupg \
|
||||||
sudo && \
|
sudo \
|
||||||
|
# procps \
|
||||||
|
iputils-ping \
|
||||||
|
&& \
|
||||||
apt-get clean && apt-get autoclean && \
|
apt-get clean && apt-get autoclean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/var/log/fsck/*.log \
|
/var/log/fsck/*.log \
|
||||||
|
|||||||
+12
-24
@@ -1,47 +1,35 @@
|
|||||||
|
name: seafile-client-${TARGET}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:10.11
|
image: mariadb:10.11
|
||||||
environment:
|
env_file: env
|
||||||
- MYSQL_ROOT_PASSWORD=password # Requested, set the root's password of MySQL service.
|
|
||||||
- MYSQL_LOG_CONSOLE=true
|
|
||||||
- MARIADB_AUTO_UPGRADE=1
|
|
||||||
volumes:
|
volumes:
|
||||||
- database:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
|
- database:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
|
||||||
|
|
||||||
memcached:
|
memcached:
|
||||||
image: memcached:1.6.18
|
image: memcached:1.6.18
|
||||||
container_name: seafile-memcached
|
|
||||||
entrypoint: memcached -m 256
|
entrypoint: memcached -m 256
|
||||||
|
|
||||||
seafile:
|
seafile:
|
||||||
image: seafileltd/seafile-mc:latest
|
image: seafileltd/seafile-mc:latest
|
||||||
|
hostname: seafile-${TARGET}
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80"
|
||||||
volumes:
|
volumes:
|
||||||
- seafile:/shared # Requested, specifies the path to Seafile data persistent store.
|
- seafile:/shared # Requested, specifies the path to Seafile data persistent store.
|
||||||
environment:
|
env_file: env
|
||||||
- DB_HOST=mariadb
|
|
||||||
- DB_ROOT_PASSWD=password # Requested, the value should be root's password of MySQL service.
|
|
||||||
- TIME_ZONE=Etc/UTC # Optional, default is UTC. Should be uncomment and set to your local time zone.
|
|
||||||
- SEAFILE_ADMIN_EMAIL=seafile@localhost # Specifies Seafile admin user, default is 'me@example.com'.
|
|
||||||
- SEAFILE_ADMIN_PASSWORD=password # Specifies Seafile admin password, default is 'asecret'.
|
|
||||||
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- mariadb
|
- mariadb
|
||||||
- memcached
|
- memcached
|
||||||
|
|
||||||
client:
|
client:
|
||||||
image: seafile-client:unstable
|
# image: flowgunso/seafile-client:9.0.5
|
||||||
volumes:
|
image: seafile-client:${TARGET}
|
||||||
#- library:/library
|
# volumes:
|
||||||
- data:/seafile
|
# - library:/library
|
||||||
# user: "1000:1000"
|
# - data:/seafile
|
||||||
environment:
|
env_file: env
|
||||||
SEAF_SERVER_URL: "http://seafile"
|
|
||||||
SEAF_USERNAME: "seafile@localhost"
|
|
||||||
SEAF_PASSWORD: "password"
|
|
||||||
SEAF_LIBRARY_UUID: "1b7d4e92-6753-4c4a-85b0-42566eab42c8"
|
|
||||||
DEBUG: 1
|
|
||||||
UID: 1000
|
UID: 1000
|
||||||
GID: 100
|
GID: 100
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
until curl --output /dev/null --silent --head --fail http://seafile-${TARGET}; do
|
||||||
|
printf '.'
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Database
|
||||||
|
MYSQL_ROOT_PASSWORD=password # Requested, set the root's password of MySQL service.
|
||||||
|
MYSQL_LOG_CONSOLE=true
|
||||||
|
MARIADB_AUTO_UPGRADE=1
|
||||||
|
|
||||||
|
# Seafile
|
||||||
|
DB_HOST=mariadb
|
||||||
|
DB_ROOT_PASSWD=password # Requested, the value should be root's password of MySQL service.
|
||||||
|
TIME_ZONE=Etc/UTC # Optional, default is UTC. Should be uncomment and set to your local time zone.
|
||||||
|
SEAFILE_ADMIN_EMAIL=seafile@localhost # Specifies Seafile admin user, default is 'me@example.com'.
|
||||||
|
SEAFILE_ADMIN_PASSWORD=password # Specifies Seafile admin password, default is 'asecret'.
|
||||||
|
SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
|
||||||
|
|
||||||
|
# Client
|
||||||
|
SEAF_SERVER_URL="http://seafile-${TARGET}"
|
||||||
|
SEAF_USERNAME="seafile@localhost"
|
||||||
|
SEAF_PASSWORD="password"
|
||||||
|
DEBUG=1
|
||||||
|
# SEAF_LIBRARY_UUID="" # Use this for custom library ID
|
||||||
Reference in New Issue
Block a user