Created
May 8, 2021 06:11
-
-
Save xinyii/706541c43812777153ed073adf586b2b to your computer and use it in GitHub Desktop.
[Docker deploy back-end] #docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.1' | |
services: | |
server: | |
container_name: server | |
build: . | |
image: server | |
ports: | |
- 8080:8080 | |
restart: always | |
depends_on: | |
- db | |
web: | |
container_name: web | |
build: | |
context: ../web | |
dockerfile: ../web/Dockerfile | |
image: web | |
ports: | |
- 80:80 | |
restart: always | |
depends_on: | |
- server | |
db: | |
container_name: db | |
image: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
mysql_adminer: | |
container_name: db_adminer | |
image: adminer | |
restart: always | |
ports: | |
- 8081:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:11-jre | |
WORKDIR /usr/src/app | |
EXPOSE 8080 | |
COPY ./build/install/<project> . | |
ENTRYPOINT ["sh","./bin/<project>", "--spring.profiles.active=edge"] | |
HEALTHCHECK --start-period=30s --interval=30s --timeout=3s --retries=3 \ | |
CMD curl --silent --fail --request GET http://localhost:8080/swagger-ui.html || exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment