Skip to content
Snippets Groups Projects
Commit 27c6c4bb authored by Sebastian Mohr's avatar Sebastian Mohr
Browse files

Added docker compose for local prod without registry

parent 46a51930
No related branches found
No related tags found
No related merge requests found
Pipeline #509645 passed
x-env_file: &env_file # Path to the used configuration file
- .env
services:
nginx:
container_name: snip_nginx
image: nginx
volumes:
- ./apps/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./apps/nginx/static:/static
- ./apps/nginx/ssl:/ssl
ports:
- ${PORT}:443
depends_on:
- next
- images
env_file: *env_file
next:
container_name: snip_next
build:
context: .
dockerfile: Dockerfile_node
target: next
depends_on:
- mariadb
env_file: *env_file
images:
container_name: snip_images
image: docker.gitlab.gwdg.de/irp/snip/images:latest
build:
context: .
dockerfile: Dockerfile_node
target: images
env_file: *env_file
volumes:
# If you want to image cache to persist between restarts
# Also include the images volume below
- images:/usr/src/app/images
socket:
container_name: snip_socket
build:
context: .
dockerfile: Dockerfile_node
target: socket
env_file: *env_file
email:
container_name: snip_email
build:
context: .
dockerfile: Dockerfile_node
target: email
env_file: *env_file
mariadb:
image: mariadb:10.6
container_name: mariadb
command:
[
"--default-authentication-plugin=mysql_native_password",
"--max_connections=210",
]
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- database:/var/lib/mysql
- ./database/dumps/init.sql:/docker-entrypoint-initdb.d/init.sql
- /tmp/backup:/backup #Direct mount to the host
expose:
- 3306
ports:
- 3306:3306
logging:
options:
max-size: "200k"
max-file: "10"
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: phpmyadmin
links:
- mariadb
ports:
- 5667:80
environment:
PMA_ARBITRARY: 0
PMA_HOST: mariadb
PMA_PORT: 3306
restart: always
depends_on:
- mariadb
logging:
options:
max-size: "200k"
max-file: "10"
volumes:
database:
images:
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"eslint": "^8.57.0", "eslint": "^8.57.0",
"prettier": "^3.3.3" "prettier": "^3.3.3"
}, },
"packageManager": "pnpm@9.10.0", "packageManager": "pnpm@9.11.0",
"engines": { "engines": {
"node": ">=18" "node": ">=18"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment