Docker: Add testcafe and firefox to development image; change mysql port
This commit is contained in:
parent
d9916c89a2
commit
d26f7fb0dc
7 changed files with 22 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM photoprism/development:20190516
|
||||
FROM photoprism/development:20190520
|
||||
|
||||
# Set up project directory
|
||||
WORKDIR "/go/src/github.com/photoprism/photoprism"
|
||||
|
|
|
@ -5,12 +5,12 @@ services:
|
|||
build: .
|
||||
image: photoprism/photoprism:develop
|
||||
depends_on:
|
||||
- database
|
||||
- photoprism-mysql
|
||||
ports:
|
||||
- 2342:80 # Web Server (PhotoPrism)
|
||||
- 4000:4000 # Database (MySQL compatible)
|
||||
- "2342:2342" # Web Server (PhotoPrism)
|
||||
- "4000:4000" # Database (MySQL compatible)
|
||||
volumes:
|
||||
- .:/go/src/github.com/photoprism/photoprism
|
||||
- ".:/go/src/github.com/photoprism/photoprism"
|
||||
environment:
|
||||
PHOTOPRISM_DEBUG: "true"
|
||||
PHOTOPRISM_SERVER_MODE: "debug"
|
||||
|
@ -21,17 +21,21 @@ services:
|
|||
PHOTOPRISM_ORIGINALS_PATH: "/go/src/github.com/photoprism/photoprism/assets/photos/originals"
|
||||
PHOTOPRISM_DATABASE_DRIVER: "internal"
|
||||
PHOTOPRISM_DATABASE_DSN: "root:photoprism@tcp(localhost:4000)/photoprism?parseTime=true"
|
||||
PHOTOPRISM_HTTP_HOST: "0.0.0.0"
|
||||
PHOTOPRISM_HTTP_PORT: 2342
|
||||
PHOTOPRISM_SQL_HOST: "0.0.0.0"
|
||||
PHOTOPRISM_SQL_PORT: 4000
|
||||
PHOTOPRISM_SQL_PASSWORD: "photoprism"
|
||||
PHOTOPRISM_DARKTABLE_CLI: "/usr/bin/darktable-cli"
|
||||
TF_CPP_MIN_LOG_LEVEL: 1
|
||||
|
||||
database:
|
||||
photoprism-mysql:
|
||||
image: mysql:8.0.16
|
||||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024
|
||||
command: mysqld --port=4001 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=1024
|
||||
expose:
|
||||
- "4001"
|
||||
ports:
|
||||
- 4001:3306 # MySQL (for tests)
|
||||
- "4001:4001" # MySQL (for tests)
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: photoprism
|
||||
MYSQL_USER: photoprism
|
||||
|
|
|
@ -45,7 +45,8 @@ RUN apt-get update && apt-get upgrade && \
|
|||
libgtk-3-bin \
|
||||
tzdata \
|
||||
gconf-service \
|
||||
chromium-browser
|
||||
chromium-browser \
|
||||
firefox
|
||||
|
||||
# Install darktable (RAW to JPEG converter)
|
||||
RUN add-apt-repository ppa:pmjdebruijn/darktable-release && \
|
||||
|
@ -72,7 +73,7 @@ RUN apt-get update && \
|
|||
|
||||
# Install and configure NodeJS Package Manager (npm)
|
||||
ENV NODE_ENV production
|
||||
RUN npm install -g npm
|
||||
RUN npm install -g npm testcafe
|
||||
RUN npm config set cache ~/.cache/npm
|
||||
|
||||
# Install Go
|
||||
|
@ -112,6 +113,7 @@ WORKDIR "/go/src/github.com/photoprism/photoprism"
|
|||
|
||||
# Expose HTTP port plus 4000 for TiDB and 8080 for broadwayd (not running by default)
|
||||
EXPOSE 80
|
||||
EXPOSE 2342
|
||||
EXPOSE 4000
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM photoprism/development:20190516 as build
|
||||
FROM photoprism/development:20190520 as build
|
||||
|
||||
# Set up project directory
|
||||
WORKDIR "/go/src/github.com/photoprism/photoprism"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM photoprism/development:20190516
|
||||
FROM photoprism/development:20190520
|
||||
|
||||
# Install Python and TensorFlow
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
|
|
@ -6,6 +6,7 @@ const webpack = require("webpack");
|
|||
|
||||
const PATHS = {
|
||||
app: path.join(__dirname, "src/app.js"),
|
||||
js: path.join(__dirname, "src"),
|
||||
css: path.join(__dirname, "src/app/css"),
|
||||
build: path.join(__dirname, "../assets/server/public/build"),
|
||||
};
|
||||
|
@ -59,6 +60,7 @@ const config = {
|
|||
{
|
||||
test: /\.vue$/,
|
||||
loader: "vue-loader",
|
||||
include: PATHS.js,
|
||||
options: {
|
||||
loaders: {
|
||||
js: "babel-loader",
|
||||
|
@ -69,6 +71,7 @@ const config = {
|
|||
{
|
||||
test: /\.js$/,
|
||||
loader: "babel-loader",
|
||||
include: PATHS.js,
|
||||
exclude: file => (
|
||||
/node_modules/.test(file)
|
||||
),
|
||||
|
|
|
@ -39,7 +39,7 @@ func NewTestParams() *Params {
|
|||
ImportPath: testDataPath + "/import",
|
||||
ExportPath: testDataPath + "/export",
|
||||
DatabaseDriver: "mysql",
|
||||
DatabaseDsn: "photoprism:photoprism@tcp(database:3306)/photoprism?parseTime=true",
|
||||
DatabaseDsn: "photoprism:photoprism@tcp(photoprism-mysql:4001)/photoprism?parseTime=true",
|
||||
}
|
||||
|
||||
return c
|
||||
|
|
Loading…
Reference in a new issue