WIP: connection to db possible

This commit is contained in:
marko
2024-07-21 16:49:30 +02:00
parent 86276f4ec1
commit 9e5f192dda
2 changed files with 6 additions and 7 deletions

View File

@@ -11,10 +11,11 @@ services:
# forward port 80 top port 80 in the container # forward port 80 top port 80 in the container
- "80:80" - "80:80"
# files and directories to be available in the container # files and directories to be available in the container
volumes: # - localPath:pathInContainer
volumes:
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf - ./nginx.conf:/etc/nginx/conf.d/nginx.conf
# - ./app:/app # - ./app:/app
- .cwsvjudo:/users/cwsvjudo/ - ./cwsvjudo@bplaced/:/users/cwsvjudo
# php and extensions # php and extensions
php: php:
# use pre-build image from docker.. # use pre-build image from docker..
@@ -26,7 +27,7 @@ services:
# files and directories to be available in the container # files and directories to be available in the container
# @todo Except from better structuring: Is there a reason for not having the volumes as one central list? # @todo Except from better structuring: Is there a reason for not having the volumes as one central list?
volumes: volumes:
- ./app:/app - ./cwsvjudo@bplaced:/users/cwsvjudo/
# install a dm # install a dm
# @todo Maybe use postgre instead? # @todo Maybe use postgre instead?
database: database:
@@ -37,7 +38,6 @@ services:
environment: environment:
MYSQL_USER: 'cwsvjudo' MYSQL_USER: 'cwsvjudo'
MYSQL_DATABASE: 'cwsvjudo' MYSQL_DATABASE: 'cwsvjudo'
MYSQL_TCP_PORT: '3306'
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_PASSWORD_FILE: /run/secrets/db_password MYSQL_PASSWORD_FILE: /run/secrets/db_password
volumes: volumes:
@@ -45,8 +45,7 @@ services:
# initial database # initial database
# - has to be created first, e.g., by dumping the database from the prooductive system # - has to be created first, e.g., by dumping the database from the prooductive system
- ./cwsvjudo.sql:/docker-entrypoint-initdb.d/cwsvjudo.sql - ./cwsvjudo.sql:/docker-entrypoint-initdb.d/cwsvjudo.sql
ports:
- 3306:3306
secrets: secrets:
- db_root_password - db_root_password
- db_password - db_password

View File

@@ -1,7 +1,7 @@
# @todo Needs helpfull comments. # @todo Needs helpfull comments.
server { server {
listen 80 default_server; listen 80 default_server;
root /cwsvjudo/www; root /users/cwsvjudo/www;
index index.php index.html index.htm; index index.php index.html index.htm;