Skip to content

Commit

Permalink
Merge pull request #27 from mmaximo33/15-migrate-to-full-bash
Browse files Browse the repository at this point in the history
fix (symfony): fix dockerization
  • Loading branch information
mmaximo33 authored Jan 15, 2024
2 parents de0f0f4 + 2578cb1 commit 22a268d
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 70 deletions.
137 changes: 69 additions & 68 deletions console/implemention/symfony/environment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,76 @@
version: '3'

services:
nginx:
build:
context: ./.docker/nginx
image: efde/nginx
#restart: unless-stopped
depends_on:
- app_fpm
ports:
- 80:80
volumes:
- ./app/:/app
networks:
- symfony
app_fpm:
build:
context: ./.docker/php/${PHP_VERSION}/fpm
image: efde/php-${PHP_VERSION}-fpm
#restart: unless-stopped
depends_on:
- database
expose:
- 9000
volumes:
- ./app/:/app
networks:
- symfony
app_cli:
build:
context: ./.docker/php/${PHP_VERSION}/cli
image: efde/php-${PHP_VERSION}-cli
#restart: unless-stopped
depends_on:
- database
ports:
- 35729:35729
volumes:
- ./app/:/app
networks:
- symfony
database:
image: 'mariadb:10.4'
command: --default-authentication-plugin=mysql_native_password
#restart: unless-stopped
ports:
- 3306:3306
networks:
- symfony
nginx:
build:
context: ./.docker/nginx
image: efde/nginx
container_name: ${EFDE_PROJECT_NAME}-nginx
restart: always
ports: ['80:80']
volumes:
- ./app/:/app
depends_on: ['app_fpm']
networks: ['symfony']

phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
#restart: unless-stopped
links:
- database
ports:
- 8080:80
networks:
- symfony
depends_on:
- database
#mailhog:
# image: mailhog/mailhog
# ports:
# - 1025:1025 # smtp server
# - 8025:8025 # web ui
# links:
# - app
# tty: true
app_fpm:
build:
context: ./.docker/php/${PHP_VERSION}/fpm
image: efde/php-${PHP_VERSION}-fpm
container_name: ${EFDE_PROJECT_NAME}-app-fpm
restart: always
env_file: .env
expose:
- 9000
volumes:
- ./app/:/app
depends_on: ['database']
networks: ['symfony']

app_cli:
build:
context: ./.docker/php/${PHP_VERSION}/cli
image: efde/php-${PHP_VERSION}-cli
container_name: ${EFDE_PROJECT_NAME}-app-cli
restart: always
env_file: .env
ports: ['35729:35729']
volumes:
- ./app/:/app
depends_on: ['database']
networks: ['symfony']


database:
image: 'mariadb:10.11.2'
restart: always
container_name: ${EFDE_PROJECT_NAME}-database
env_file: .env
ports: ['3306:3306']
volumes:
- .docker/database:/var/lib/mysql
networks: ['symfony']

phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
container_name: ${EFDE_PROJECT_NAME}-phpmyadmin
env_file: .env
links: ['database']
ports: ['8080:80']
depends_on: ['database']
networks: ['symfony']

# mailhog:
# image: mailhog/mailhog
# ports:
# - 1025:1025 # smtp server
# - 8025:8025 # web ui
# links:
# - app
# tty: true

networks:
symfony:
symfony:
volumes:
symfony:
symfony:
5 changes: 3 additions & 2 deletions console/implemention/symfony/tasks/install
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ _mod_.set_database_variables(){
fi

# Default variables
GLOBAL_SETUP_IMPLEMENTION['PMA_HOST']=database
GLOBAL_SETUP_IMPLEMENTION['MYSQL_HOST']=database
GLOBAL_SETUP_IMPLEMENTION['PMA_HOST']=${GLOBAL_SETUP_IMPLEMENTION['MYSQL_HOST']}
GLOBAL_SETUP_IMPLEMENTION['PMA_USER']=root
GLOBAL_SETUP_IMPLEMENTION['PMA_PASSWORD']="${GLOBAL_SETUP_IMPLEMENTION['MYSQL_ROOT_PASSWORD']}"
}
Expand Down Expand Up @@ -109,6 +110,6 @@ _mod_.docker_start(){
docker.tasks.main.dp_all_stop
docker.tasks.main.dp_up
efde.tasks.implemention.clear_global_variables
common.tasks.message.success "SUCCES: Project installed successfully, check the url http://localhost"
common.tasks.message.success "SUCCES: Project installed successfully, check the url \n- http://localhost \n- http://localhost:8080\n"
}

0 comments on commit 22a268d

Please sign in to comment.