Compare commits

..

5 commits

6 changed files with 88 additions and 41 deletions

View file

@ -1,51 +1,55 @@
# Docker
Note: `buildx` is required for building multi-arch images. See [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) for more information.
Note: If you want to build images for multiple architectures, you must use `buildx`. See [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) for more information.
If unsure, skip to single-arch image build instructions.
## Build
Note: commands below should be run from the root of the repository.
Note: **commands below must be run from the this directory** (`/install/automated/docker/`).
### Multi-arch (arm64, amd64)
Base images:
```
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/php:8.2-cli . --load -f install/automated/docker/base-php-cli.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/php:8.2-apache . --load -f install/automated/docker/base-php-apache.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/php:8.2-cli ../../.. --load -f base-php-cli.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/php:8.2-apache ../../.. --load -f base-php-apache.Dockerfile
```
DB images:
```
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/mariadb:10.9-primary . --load -f install/automated/docker/mariadb-primary.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb . --load -f install/automated/docker/mariadb-eventdb.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/mariadb:10.9-primary ../../.. --load -f mariadb-primary.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb ../../.. --load -f mariadb-eventdb.Dockerfile
```
OpenVK main image:
```
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/openvk:latest . --load -f install/automated/docker/openvk.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/openvk:latest ../../.. --load -f openvk.Dockerfile
```
### Single-arch
Base images:
```
docker build -t ghcr.io/openvk/openvk/php:8.2-cli . -f install/automated/docker/base-php-cli.Dockerfile
docker build -t ghcr.io/openvk/openvk/php:8.2-apache . -f install/automated/docker/base-php-apache.Dockerfile
docker build -t ghcr.io/openvk/openvk/php:8.2-cli ../../.. -f base-php-cli.Dockerfile
docker build -t ghcr.io/openvk/openvk/php:8.2-apache ../../.. -f base-php-apache.Dockerfile
```
DB images:
```
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-primary . -f install/automated/docker/mariadb-primary.Dockerfile
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb . -f install/automated/docker/mariadb-eventdb.Dockerfile
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-primary ../../.. -f mariadb-primary.Dockerfile
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb ../../.. --f mariadb-eventdb.Dockerfile
```
OpenVK main image:
```
docker build -t ghcr.io/openvk/openvk/openvk:latest . -f install/automated/docker/openvk.Dockerfile
docker build -t ghcr.io/openvk/openvk/openvk:latest ../../.. -f openvk.Dockerfile
```
## Run
If you have Docker Desktop installed, then you probably have `docker-compose` installed as well. If not, refer to [Docker Compose](https://docs.docker.com/compose/install/) for installation instructions.
If you have Docker Desktop installed, then you should have `docker compose` installed automatically. If not, refer to [Docker Compose](https://docs.docker.com/compose/install/) for installation instructions.
Before start, copy `openvk-example.yml` from the root of the repository to `openvk.yml` in this directory and edit it to your liking.
Example configurations are located in this directory for convenience. Before start, copy `openvk.example.yml` to `openvk.yml`, then `chandler.example.yml` to `chandler.yml` and edit them to your liking.
Then, obtain `chandler-example.yml` from [chandler repository](https://github.com/openvk/chandler/blob/master/chandler-example.yml) and place it in this directory as well.
Start is simple as `docker-compose up -d`. You can also use `docker-compose up` to see logs.
Start is simple as `docker compose up -d`. You can also use `docker compose up` to see logs.
- OpenVK will be available at `http://localhost:8080/`.
- PHPMyAdmin will be available at `http://localhost:8081/`.
- Adminer will be available at `http://localhost:8082/`.
### Running in development environment
By using additional `docker-compose.dev.yml` file you can develop OpenVK in Docker with automatic updates as you edit and save your code. Simply run:
```
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --watch
```

View file

@ -0,0 +1,20 @@
services:
openvk:
build:
context: ../../..
dockerfile: install/automated/docker/openvk.Dockerfile
develop:
watch:
- path: ../../..
action: sync
target: /opt/chandler/extensions/available/openvk
ignore:
- vendor/
- path: ../../../composer.json
action: rebuild
- path: ../../../composer.lock
action: rebuild
- path: ../../../Web/static/js/package-lock.json
action: rebuild
- path: ../../../Web/static/js/package.json
action: rebuild

View file

@ -1,4 +1,4 @@
version: '3.7'
name: openvk
services:
openvk:

View file

@ -1,7 +1,7 @@
.page_header {
background-image: url('/themepack/midnight/0.0.2.9/resource/xheader.png') !important;
background-image: url('/themepack/midnight/0.0.3.0/resource/xheader.png') !important;
}
.page_custom_header {
background-image: url('/themepack/midnight/0.0.2.9/resource/xheader_custom.png') !important;
background-image: url('/themepack/midnight/0.0.3.0/resource/xheader_custom.png') !important;
}

View file

@ -9,7 +9,8 @@ html {
body,
#backdropDripper,
#standaloneCommentBox,
.ovk-photo-view {
.ovk-photo-view,
.articleView {
background-color: #0e0b1a;
color: #c6d2e8;
}
@ -23,7 +24,8 @@ span,
.crp-entry--message---text,
.messenger-app--messages---message .time,
.navigation-lang .link_new,
.tippy-box text {
.tippy-box text,
.articleView_author > div > span > a {
color: #8b9ab5 !important;
}
@ -130,10 +132,19 @@ th,
.borderup,
#tour,
#auth,
.ovk-photo-view {
.ovk-photo-view,
.page_wrap_content_main .def_row_content,
.topGrayBlock,
.bigPlayer {
border-color: #2c2640 !important;
}
.post-upload,
.post-has-poll,
.post-has-note {
color: #777;
}
.tippy-box[data-theme~="vk"][data-placement^='top']>.tippy-arrow::before,
.tippy-box[data-theme~="vk"][data-placement^='bottom']>.tippy-arrow::before {
border-top-color: #1e1a2b;
@ -154,22 +165,28 @@ hr {
.messagebox-content-header,
.accent-box,
.button_search,
.search_box_button {
.header_navigation #search_box .search_box_button {
background-color: #383052;
}
.header_navigation #search_box .search_box_button {
box-shadow: 0px 2px 0px 0px rgb(70, 63, 96) inset;
}
.search_option_name {
background-color: #383052 !important;
color: lightgrey !important;
}
.tab:hover {
.tab:hover,
.ntSelect:hover {
background-color: #40375e;
}
.menu_divider,
.ovk-diag-action,
.minilink .counter {
.minilink .counter,
.topGrayBlock {
background-color: #2c2640;
}
@ -266,7 +283,8 @@ center[style="background: white;border: #DEDEDE solid 1px;"],
td.e,
tr.e,
.playlistListView:hover,
.playlistListView .playlistCover {
.playlistListView .playlistCover,
.photosInsert > div {
background-color: #231e33 !important;
}
@ -295,11 +313,11 @@ tr.v,
}
.content_title_expanded {
background-image: url("/themepack/midnight/0.0.2.9/resource/flex_arrow_open.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/flex_arrow_open.png") !important;
}
.content_title_unexpanded {
background-image: url("/themepack/midnight/0.0.2.9/resource/flex_arrow_shut.gif") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/flex_arrow_shut.gif") !important;
}
.ovk-video>.preview,
@ -326,17 +344,17 @@ tr.h {
.page_yellowheader {
color: #c6d2e8;
background-image: url("/themepack/midnight/0.0.2.9/resource/header_purple.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/header_purple.png") !important;
background-color: #231f34;
border-color: #231f34;
}
.page_header {
background-image: url("/themepack/midnight/0.0.2.9/resource/header.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/header.png") !important;
}
.page_custom_header {
background-image: url("/themepack/midnight/0.0.2.9/resource/header_custom.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/header_custom.png") !important;
}
.page_yellowheader span,
@ -374,11 +392,11 @@ select,
}
input[type="checkbox"] {
background-image: url("/themepack/midnight/0.0.2.9/resource/checkbox.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/checkbox.png") !important;
}
input[type="radio"] {
background-image: url("/themepack/midnight/0.0.2.9/resource/radio.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/radio.png") !important;
}
.header_navigation .link, .header_navigation .header_divider_stick {
@ -386,20 +404,20 @@ input[type="radio"] {
}
.heart {
background-image: url("/themepack/midnight/0.0.2.9/resource/like.gif") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/like.gif") !important;
}
.pinned-mark,
.post-author .pin {
background-image: url("/themepack/midnight/0.0.2.9/resource/pin.png") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/pin.png") !important;
}
.repost-icon {
background-image: url("/themepack/midnight/0.0.2.9/resource/published.gif") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/published.gif") !important;
}
.post-author .delete {
background-image: url("/themepack/midnight/0.0.2.9/resource/input_clear.gif") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/input_clear.gif") !important;
}
.user-alert {
@ -432,7 +450,7 @@ input[type="radio"] {
}
#backdropEditor {
background-image: url("/themepack/midnight/0.0.2.9/resource/backdrop-editor.gif") !important;
background-image: url("/themepack/midnight/0.0.3.0/resource/backdrop-editor.gif") !important;
border-color: #473e66 !important;
}
@ -485,7 +503,8 @@ input[type="radio"] {
background: #19142D !important;
}
.audioEntry .performer a {
.audioEntry .performer a,
.bigPlayer .paddingLayer .trackInfo a {
color: #a2a1a1 !important;
}
@ -591,3 +610,7 @@ ul {
background: #28223a;
border: #2c2640 solid 1px;
}
#backdropFilePicker {
margin: 15px !important;
}

View file

@ -1,5 +1,5 @@
id: midnight
version: "0.0.2.9"
version: "0.0.3.0"
openvk_version: 0
enabled: 1
metadata: