mirror of
https://github.com/1C-Company/docker_fresh.git
synced 2024-12-04 10:24:48 +02:00
Merge pull request #11 from WizaXxX/master
add s3 file storage close #4
This commit is contained in:
commit
d050e3838a
@ -150,7 +150,7 @@ sudo python3 start.py
|
||||
Для доступа к сайту, веб клиентам информационных баз или доступу через конфигуратор необходимо сконфигурировать файл **hosts**.
|
||||
В файл **hosts** требуется добавить следующю строку
|
||||
```bash
|
||||
192.168.1.6 mystandname.1cfresh.dev srv.mystandname.1cfresh.dev
|
||||
192.168.1.6 mystandname.1cfresh.dev srv.mystandname.1cfresh.dev s3.1cfresh.dev
|
||||
```
|
||||
Где вместо **192.168.1.6** необходимо указать ip адрес сервера на котором вы развернули стенд Фреша, а вместо **mystandname** необходимо использовать имя указанное при развертывании стенда
|
||||
|
||||
|
@ -9,7 +9,6 @@ upstream gate {
|
||||
server gategategate:8080;
|
||||
}
|
||||
|
||||
|
||||
upstream upstream_availability {
|
||||
server sitesitesite:8080;
|
||||
}
|
||||
|
@ -1,3 +1,33 @@
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name s3.1cfresh.dev;
|
||||
|
||||
proxy_intercept_errors on;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers RC4:HIGH:!aNULL:!MD5:!kEDH;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_certificate /etc/pki-custom/fullchain.crt;
|
||||
ssl_certificate_key /etc/pki-custom/privkey.key;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_timeout 10m;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
proxy_connect_timeout 300;
|
||||
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
chunked_transfer_encoding off;
|
||||
|
||||
proxy_pass http://s3:9000;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name hosthosthost;
|
||||
|
@ -48,8 +48,23 @@ services:
|
||||
- ../images/site/distr/site/media:/var/www/content/media/
|
||||
depends_on:
|
||||
- site
|
||||
- forum
|
||||
|
||||
- forum
|
||||
s3:
|
||||
image: minio/minio:latest
|
||||
hostname: s3.1cfresh.dev
|
||||
container_name: s3.1cfresh.dev
|
||||
volumes:
|
||||
- ./artifacts/s3:/data
|
||||
environment:
|
||||
MINIO_ACCESS_KEY: minio
|
||||
MINIO_SECRET_KEY: minio123
|
||||
command: server /data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 30s
|
||||
timeout: 20s
|
||||
retries: 3
|
||||
|
||||
srv:
|
||||
image: fresh/core
|
||||
hostname: srv.HOSTNAMEREPLACE
|
||||
|
@ -6,7 +6,7 @@ def download_onescript():
|
||||
command.append('wget')
|
||||
command.append('-O')
|
||||
command.append('/out_files/onescript.rpm')
|
||||
command.append('http://oscript.io/downloads/1_1_1/onescript-engine-1.1.1-1.fc26.noarch.rpm')
|
||||
command.append('https://oscript.io/downloads/1_4_0/x64/onescript-engine-1.4.0-1.fc26.noarch.rpm')
|
||||
return command
|
||||
|
||||
def unzip_platform_distr():
|
||||
|
Binary file not shown.
8
start.py
8
start.py
@ -283,6 +283,11 @@ def renew_other_files():
|
||||
call('sh -c "sed -i \'s/HOSTNAMEREPLACE/{}/\' {}vrd/*.vrd"'.format(host_name, work_dir_other))
|
||||
call('sh -c "sed -i \'s/HOSTNAMEREPLACE/{}/\' {}params.json"'.format(host_name, work_dir_other))
|
||||
|
||||
@print_description
|
||||
def create_bucket():
|
||||
"""Create new bucket to 1C"""
|
||||
|
||||
call('mkdir /out_files/workdir/artifacts/s3/files')
|
||||
|
||||
@print_description
|
||||
def publish_sevises():
|
||||
@ -439,10 +444,11 @@ if new_server:
|
||||
delete_volumes()
|
||||
|
||||
# start db srv ras web gate conteiners
|
||||
call(docker_compose_str + 'up -d db srv ras web gate', remote=False, silent=False)
|
||||
call(docker_compose_str + 'up -d db srv ras web gate s3', remote=False, silent=False)
|
||||
wait_postgres()
|
||||
|
||||
if new_server:
|
||||
create_bucket()
|
||||
publish_sevises()
|
||||
prepare_bases()
|
||||
enable_job_in_sm()
|
||||
|
Loading…
Reference in New Issue
Block a user