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
- "80:80"
# files and directories to be available in the container
volumes:
# - localPath:pathInContainer
volumes:
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf
# - ./app:/app
- .cwsvjudo:/users/cwsvjudo/
- ./cwsvjudo@bplaced/:/users/cwsvjudo
# php and extensions
php:
# use pre-build image from docker..
@@ -26,7 +27,7 @@ services:
# 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?
volumes:
- ./app:/app
- ./cwsvjudo@bplaced:/users/cwsvjudo/
# install a dm
# @todo Maybe use postgre instead?
database:
@@ -37,7 +38,6 @@ services:
environment:
MYSQL_USER: 'cwsvjudo'
MYSQL_DATABASE: 'cwsvjudo'
MYSQL_TCP_PORT: '3306'
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_PASSWORD_FILE: /run/secrets/db_password
volumes:
@@ -45,8 +45,7 @@ services:
# initial database
# - has to be created first, e.g., by dumping the database from the prooductive system
- ./cwsvjudo.sql:/docker-entrypoint-initdb.d/cwsvjudo.sql
ports:
- 3306:3306
secrets:
- db_root_password
- db_password

View File

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